Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def burger(n, i=1):
- width = 2*i + 3
- padding = n - i
- top_bun = ' '*padding + '/'+'‾'*(width - 2)+'\\'
- lettuce = ' '*padding + '~'*width
- patty = ' '*padding + '='*width
- pickles = ' '*padding + 'o'*width
- bottom_bun = ' '*padding + '\\'+'_'*(width - 2)+'/'
- print(top_bun)
- if i % 3 == 1:
- print(lettuce)
- if i % 2 == 0:
- [print(patty) for _ in range(i//2)]
- else:
- [print(patty) for _ in range(i//2 + 1)]
- if i < n:
- burger(n, i+1)
- [print(patty) for _ in range(i//2)]
- if i % 3 == 2:
- print(pickles)
- print(bottom_bun)
- n = int(input())
- cases = [int(input()) for _ in range(n)]
- [burger(case) for case in cases]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement