Computer Science
Write programs using nested loops to produce the following patterns:
A
A B
A B C
A B C D
A B C D E
A B C D E F
Python
Python Control Flow
112 Likes
Answer
n = 6
for i in range(n) :
t = 65
for j in range(i + 1) :
print(chr(t), end = ' ')
t += 1
print()
Output
A
A B
A B C
A B C D
A B C D E
A B C D E F
Answered By
37 Likes
Related Questions
Write programs using nested loops to produce the following patterns:
0
2 2
4 4 4
6 6 6 6
8 8 8 8 8Write programs using nested loops to produce the following patterns:
A
B B
C C C
D D D D
E E E E EWrite programs to print the following shapes:
*
* *
* *
* *
* *
* *
*Write programs to print the following shapes:
*
* *
* *
* *
*