111. Python Program to Print Number triangle.
How does this program work?
- This program is used to print Number Triangle using Python.
Here is the code
n = int(input("Enter the number of rows: "))
b = n+1
for i in range(n+1,1,-1):
b = b-1
for j in range(0, n-i+1):
print(" ", end=" ")
for j in range(0, i-1,1):
print(b, end=" " )
print(" ")
Note: (" ") Add Two Spaces Here