ShriRam Changed status to publish August 21, 2023
s = int(input(“Please enter the number of rows : “))
# The number of rows is given by the outer loop
for i in range(1, s+1):
# The number of the column is given by the inner loop
for j in range(1, i + 1):
print(j, end=’ ‘)
print(“”)
ShriRam Changed status to publish August 21, 2023