ShriRam Changed status to publish August 21, 2023
rows = int(input(“Please enter the number of rows : “))
m = (2 * rows) – 2
for i in range(0, rows):
for j in range(0, m):
print(end=” “)
# after each loop, we are decrementing the value of m
m = m – 1
for j in range(0, i + 1):
print(“* “, end=”)
print(” “)
ShriRam Changed status to publish August 21, 2023