Advertisement
eNeRGy90

Untitled

Nov 10th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. glass = int(input())
  2.  
  3. tap_count = 0
  4.  
  5.  
  6. while glass > 0:
  7.     button = input()
  8.     tap_count += 1
  9.  
  10.     if button == "Easy":
  11.         glass -= 50
  12.     elif button == "Medium":
  13.         glass -= 100
  14.     elif button == "Hard":
  15.         glass -= 200
  16.  
  17. if glass < 0:
  18.     print(f"{abs(glass)}ml has been spilled.")
  19. else:
  20.     print(f"The dispenser has been tapped {tap_count} times.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement