Advertisement
simeonshopov

STOP sign (book)

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