Python Alphabet Pattern 29

Last Updated:

Python Alphabet Pattern 29

Try to print the following alphabet pattern using Python.

Print This Output
E E E E E E E E E
E D D D D D D D E
E D C C C C C D E
E D C B B B C D E
E D C B A B C D E
E D C B B B C D E
E D C C C C C D E
E D D D D D D D E
E E E E E E E E E

Source Code

Python Compiler
k = 70 for i in range(69, 64, -1): for j in range(k-1, 65, -1): if(j > i): a = chr(j) else: a = chr(i) print(a, end=" ") for j in range(65, k): if(j > i): b = chr(j) else: b = chr(i) print(b, end=" ") print() for i in range(66, k): for j in range(k-1, 65, -1): if(j > i): a = chr(j) else: a = chr(i) print(a, end=" ") for j in range(65, k): if(j > i): b = chr(j) else: b = chr(i) print(b, end=" ") print()

Share this Page

Meet the Author