Q. Use a ‘for loop’ to print ant upside down triangle like the one below. Allow the user to specify how high the triangle should be.


****

***

**

*


Answer =


num = int (input("Enter the number :- "))
for i in range ( num, 0,-1) :
    print ("*" * i)


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post