Advertisement
Spocoman

Perfect Diamond

Oct 1st, 2023
892
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. n = int(input())
  2.  
  3. for i in range(n):
  4.     print(' ' * (n - (i + 1)) + '*' + "-*" * i)
  5.  
  6. for i in range(n - 2, -1, -1):
  7.     print(' ' * (n - (i + 1)) + '*' + "-*" * i)
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement