Print numbers in traingle – Python Lab Program

n=int(input("Enter the maximum number"))
    for i in range(1,n+1):
         for j in range(0,i):
             print (i,end=" ")
         print(" ")

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.