Star triangle with python for loop

>>> star =  input(“Enter the star to draw: “)
Enter the star to draw: *
>>> limit = int(input(“Enter the limit: “))
Enter the limit: 10
>>> for i in range(1, limit+1):
print (star*i)

Output–   
*
**
***
****
*****
******
*******
********
*********
**********

Leave a Reply

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