Saturday, November 13, 2021

Can I put a star in the bottom or side of column in Python? || Program to print full pyramid

 # Program to print full pyramid

num_rows = int(input("Enter the number of rows"))
for i in range(0, num_rows):
for j in range(0, num_rows-i-1):
print(end=" ")
for j in  range(0, i+1):
print("*", end=" ")
print()

No comments:

Post a Comment