(n)
| 13 | |
| 14 | |
| 15 | def character(n): |
| 16 | |
| 17 | num = 65 |
| 18 | |
| 19 | for i in range(0, n): |
| 20 | |
| 21 | for j in range(0, i+1): |
| 22 | |
| 23 | ch = chr(num) |
| 24 | |
| 25 | print(ch, end=" ") |
| 26 | |
| 27 | num = num + 1 |
| 28 | |
| 29 | print("\r") |
| 30 | |
| 31 | n = int(input("Enter the number of rows : ")) |
| 32 | character(n) |