Advertisement
veronikaaa86

09. Fruit or Vegetable

Jan 22nd, 2022
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. product = input()
  2.  
  3. is_fruit = product == "banana" or product == "apple" or product == "kiwi" or product == "cherry" or product == "lemon" or product == "grapes"
  4. is_vegetable = product == "tomato" or product == "cucumber" or product == "pepper" or product == "carrot"
  5.  
  6. if is_fruit:
  7. print('fruit')
  8. elif is_vegetable:
  9. print("vegetable")
  10. else:
  11. print("unknown")
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement