0
How to make a pyramid of numbers
7 Answers
+ 5
Please show your attempts.
+ 5
k = int(input("enter the number of rows:"))
print()
for i in range(0,k):
for j in range(0,k):
print(end=" ")
k = k - 1
for i in range (0,i+1):
print(i+1,end=" ")
print()
+ 3
Hamza Ali Check this I updated some. Now rest is your work.
k = int(input("enter the number of rows:"))
for i in range(0,k):
for j in range(0,k):
print(end=" \n")
k = k - 1
for i in range (0,i+1):
print(i+1,end=" ")
+ 3
It works for 2 digits number also. But some extra lines are coming after each line so you have to check that.
0
Sir i have tried this but this work for only 1 digit number
0
How it works for 2 digit number what line should be added