Number Pattern Programs Using Python

Code :

#Number Pattern Programs Using Python www.codewithcurious.com
def pattern(rows):
   x = 0
   for i in range(0 , rows):
      x += 1 
      for j in range(0, i + 1):
         print(x , end=" ") 
      print("\r") 
 
rows = 7
pattern(rows)

OUTPUT :

Leave a Comment

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