Gradually Increase Number Row - Python3
'''
Program to display followings:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
'''
a=int(input("Enter the number of rows:"))
num=1
for i in range(0,a):
num=1
for j in range(0,i+1):
print (num,end =" ")
num=num+1
print ("")
ScreenShot:
No comments:
Post a Comment