fork download
  1. # Topic: Pttern Lecture-3
  2. #Question: Code 1
  3. # Print the following pattern for the given N number of rows
  4.  
  5. n = int(input())
  6.  
  7. for i in range(n):
  8. for j in range(i , 2*i + 1):
  9. print(chr(j+65), end=" ")
  10. print()
  11.  
Success #stdin #stdout 0.02s 9372KB
stdin
4
stdout
A 
B C 
C D E 
D E F G