Advertisement
Spocoman

08. Sunglasses

Jan 2nd, 2022
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. num = int(input())
  2. for i in range(num):
  3.     row = ''
  4.     if i == 0 or i == num - 1:
  5.         row += num * 2 * '*' + num * ' ' + num * 2 * '*'
  6.     elif int((num + 1) / 2) - 1 == i:
  7.         row += '*' + (num * 2 - 2) * '/' + '*' + num * '|' + '*' + (num * 2 - 2) * '/' + '*'
  8.     else:
  9.         row += '*' + (num * 2 - 2) * '/' + '*' + num * ' ' + '*' + (num * 2 - 2) * '/' + '*'
  10.     print(row)
  11.  
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement