Write a program to accept a number and print inverted star pattern


Topic: Write a program to accept a number and print inverted star pattern

Solution

n=int(input("Enter number of rows: "))
for i in range (n,0,-1):
    print((n-i) * ' ' + i * '*')
	
	



List all Python Programs