Informatics Practices
WAP to print the following pattern:
A
B B
C C C
D D D D
E E E E E
Python Control Flow
2 Likes
Answer
n = 5
for i in range(n):
for j in range(i + 1):
print(chr(65 + i), end=" ")
print()Output
A
B B
C C C
D D D D
E E E E E
Answered By
1 Like
Related Questions
WAP to print the sum of the series 1 - x2/4! + x3/6! - x4/8! + x5/10! …………… xn/(2n)! — exponential series.
WAP to display the sum of the given series:
Sum = 1 + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3…..n)
WAP to print the following pattern:
* * * * * * * * * * * * * * *WAP to print the following pattern:
1 2 1 3 2 1 4 3 2 1 5 4 3 2 1