simeonshopov

Arrow (book)

Nov 12th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. n = int(input())
  2. outer_dots = int((n - 1) / 2)
  3. inner_dots = n - 2
  4. print("{0}{1}{0}".format("." * outer_dots, "#" * n))
  5.  
  6. for i in range(n - 2):
  7.   print("{0}#{1}#{0}".format("." * outer_dots, "." * inner_dots))
  8.  
  9. print("#{0}{1}{0}#".format("#" * outer_dots, "." * inner_dots))
  10.  
  11. outer_dots = 1
  12. inner_dots = 2 * n - 5
  13.  
  14. for i in range(n - 2):
  15.   print("{0}#{1}#{0}".format("." * outer_dots, "." * inner_dots))
  16.   outer_dots += 1
  17.   inner_dots -= 2
  18.  
  19. print("{0}#{0}".format("." * outer_dots))
Advertisement
Add Comment
Please, Sign In to add comment