Print An Inverted Star Pattern In Python

In this Basic Python Program, we will have a look at how to “print an Inverted Star Pattern In Python” with the help of Python Programming Language.

Python Program To Print An Inverted Star Pattern

n=int(input("Enter number of rows: "))

for i in range (n,0,-1):

    print((n-i) * ' ' + i * '*')

In the above Python Program, we read a number n and print an inverted star pattern of the desired size.


		

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping cart