BbJLeB

04. Fruit or Vegetable

May 7th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. x = input()
  2.  
  3. if x == "banana" or x=="apple" or x=="kiwi" or x=="cherry" or x=="lemon" or x=="grapes":
  4.     print("fruit")
  5. elif x=="tomato" or x=="cucumber" or x=="pepper" or x=="carrot":
  6.     print("vegetable")
  7. else:
  8.     print("unknown")
Advertisement
Add Comment
Please, Sign In to add comment