jumboframe

Pyramid of numbers

Jun 7th, 2018
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n=int(input())
  2.  
  3.  
  4. num=1
  5. for row in range (1, n+1):
  6.     for col in range (0, row):
  7.         if num > n:
  8.             break
  9.         print (num, end = " ")
  10.         num +=1
  11.     print()
  12.     if num > n:
  13.         break
RAW Paste Data