Inverted Solid Right Triangle
Given an integer number
The first line of input is an integer
In the given example the solid right angled triangle of side
4. Therefore, the output should be
* * * *
* * *
* *
*
rows = int(input("Enter the number of rows: "))
for i in range(rows, 0, -1):
print(" "*(rows-i) ,end="")
for j in range(0, i ):
print("*", end=" ")
print("")
Comments
Leave a comment