Advertisement
j33vansh

Answer 2 Looping Py

Jun 26th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. n = int(input())
  2. currRow = 1
  3.  
  4. while currRow <= n:
  5.     currCol = 1
  6.     ch = ord('A') + n - currRow
  7.  
  8.     while currCol <= currRow:
  9.         print(chr(ch + currCol - 1), end="")
  10.         currCol += 1
  11.     print()
  12.     currRow += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement