desislava_topuzakova

09. Fruit or Vegetable

Oct 21st, 2020
647
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. product = input()
  2.  
  3. #"fruit" имат следните възможни стойности:  banana, apple, kiwi, cherry, lemon и grapes
  4. #"vegetable" имат следните възможни стойности:  tomato, cucumber, pepper и carrot;
  5. #unknown
  6.  
  7. if product == 'banana' or product == 'apple' or product == 'kiwi' or product == 'cherry' or product == 'lemon' or product == 'grapes':
  8.     print("fruit")
  9. elif product == 'tomato' or product == 'cucumber' or product == 'pepper' or product == 'carrot':
  10.     print('vegetable')
  11. else:
  12.     print('unknown')
RAW Paste Data