Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ice_cream = {'nice':3, 'bad': 4, 'half_way':5}
- total=0
- while True:
- your_ice = input('\nWhat ice cream would you like: ')
- if your_ice in ice_cream:
- print(f'{your_ice} costs: {ice_cream[your_ice]}kn.')
- total += ice_cream[your_ice]
- print(f'Running total: {total}kn.')
- elif your_ice:
- print(f"Sorry, we don't have {your_ice}.")
- else:
- break
- print(f'\n\nThanks. Your total ice cream bill: {total}kn.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement