python code to print the right alphabetic triangle up to the given N rows.
import string
alpha = list(string.ascii_lowercase)
n = int(input())
for i in range(1,n):
for j in range(0,n-i):
print(" ", end="")
for k in reversed(range(0,i)):
print(alpha[k], end="")
print("")
Comments
Leave a comment