Sabev

Draw a Filled Square

Jan 10th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. num = int(input())
  2. num_body_repeat = int(num - 2)
  3. num_body = int(num - 1)
  4.  
  5. def prin_tire():
  6.     for a in range(0, num * 2):
  7.         print("-", end='')
  8.  
  9. def print_body():
  10.     for a in range(0, num_body_repeat):
  11.         print("-", end='')
  12.         for a in range(0, num_body):
  13.             print("\/", end='')
  14.         print("-")
  15.  
  16. prin_tire()
  17. print()
  18. print_body()
  19. prin_tire()
Advertisement
Add Comment
Please, Sign In to add comment