Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glass = int(input())
- tap_count = 0
- while glass > 0:
- button = input()
- tap_count += 1
- if button == "Easy":
- glass -= 50
- elif button == "Medium":
- glass -= 100
- elif button == "Hard":
- glass -= 200
- if glass < 0:
- print(f"{abs(glass)}ml has been spilled.")
- else:
- print(f"The dispenser has been tapped {tap_count} times.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement