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