Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = int(input())
- for row in range(1, int((num + 1) / 2)):
- if row != int((num + 1) / 2):
- if num % 2 == 0:
- output = int(num / 2 - row) * '-' + (row * 2) * '*' + int(num / 2 - row) * '-'
- else:
- output = int(num / 2 - row + 1) * '-' + (row * 2 - 1) * '*' + int(num / 2 - row + 1) * '-'
- print(output)
- print(num * '*')
- for i in range(1, int((num + 2) / 2)):
- output = ''
- for j in range(num):
- if j == 0 or j == num - 1:
- output += '|'
- else:
- output += '*'
- print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement