Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command = input()
- adult = 0
- kids = 0
- money_toys = 0
- money_swet = 0
- while command != "Christmas":
- years = int(command)
- if years <= 16:
- kids += 1
- money_toys = 5
- elif years > 16:
- adult += 1
- money_swet = 15
- command = input()
- total_money_toys = money_toys * kids
- total_money_swet = money_swet * adult
- if command == "Christmas":
- print(f"Number of adults: {adult}")
- print(f"Number of kids: {kids}")
- print(f"Money for toys: {total_money_toys}")
- print(f"Money for sweaters: {total_money_swet}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement