Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- stars = 2
- spaces = 2 * n - 2
- for row in range(n):
- print(' ' * spaces + '*' * stars)
- spaces -= 2
- stars += 2
- spaces = 2
- stars = 2 * n - 2
- for row in range(2):
- print('*' * stars + ' ' * spaces)
- spaces += 2
- stars -= 2
- spaces = 2
- stars = 2 * n - 2
- for row in range(2):
- print('*' * stars + ' ' * spaces)
- if spaces > 0 and stars > 0:
- spaces -= 2
- stars += 2
- spaces = 2
- stars = 2 * n - 2
- for row in range(2):
- print(' ' * spaces + '*' * stars)
- spaces += 2
- stars -= 2
- spaces = 2
- stars = 2 * n - 2
- for row in range(2):
- print(' ' * spaces + '*' * stars)
- if spaces > 0 and stars > 0:
- spaces -= 2
- stars += 2
- spaces = 2
- stars = 2 * n - 2
- for row in range(n):
- print('*' * stars + ' ' * spaces)
- spaces += 2
- stars -= 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement