Advertisement
pacho_the_python

Untitled

Sep 2nd, 2023
823
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. n = int(input())
  2.  
  3. empty = n - 1
  4. stars = 1
  5.  
  6. for i in range(1, n + 1):
  7.     print(" " * empty + "* " * stars)
  8.     empty -= 1
  9.     stars += 1
  10.  
  11. high_down = n - 1
  12. down_empty = 1
  13. down_stars = n - 1
  14. for j in range(1, high_down + 1):
  15.     print(" " * down_empty + "* " * down_stars)
  16.     down_empty += 1
  17.     down_stars -= 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement