Advertisement
Guest User

how_much_coffee_do_you_need

a guest
Jan 26th, 2020
637
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. action = input()
  2.  
  3. coffees = 0
  4. counter = 0
  5.  
  6. action_to_lower = ['coding', 'movie', 'dog', 'cat']
  7. action_to_upper = ['CODING', 'MOVIE', 'DOG', 'CAT']
  8.  
  9. while action != 'END':
  10.     counter += 1
  11.  
  12.     if action in action_to_lower:
  13.         coffees += 1
  14.     elif action in action_to_upper:
  15.         coffees += 2
  16.  
  17.     action = input()
  18.  
  19. if counter < 5:
  20.     print(coffees)
  21. else:
  22.     print('You need extra sleep')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement