Advertisement
GeorgiLukanov87

coffeeeee

May 20th, 2022
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. command = input()
  2. coffee = 0
  3. condition = False
  4. while not command == 'END':
  5.  
  6.     if command == 'cat':
  7.         coffee += 1
  8.     elif command == 'CAT':
  9.         coffee += 2
  10.     elif command == 'dog':
  11.         coffee += 1
  12.     elif command == 'DOG':
  13.         coffee += 2
  14.     elif command == 'movie':
  15.         coffee += 1
  16.     elif command == 'MOVIE':
  17.         coffee += 2
  18.     elif command == 'coding':
  19.         coffee += 1
  20.     elif command == 'CODING':
  21.         coffee += 2
  22.     if coffee > 5:
  23.         print(f"You need extra sleep")
  24.         condition = True
  25.         break
  26.     command = input()
  27. if not condition:
  28.     print(coffee)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement