-
-
Save dpickett/b31b0104893f6e2b5e63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MEATS = [ | |
'steak', | |
'roast beef' | |
] | |
FRUITS = [ | |
'apple', | |
'orange', | |
'grapes' | |
] | |
VEGETABLES = [ | |
'carrots', | |
'corn', | |
'squash' | |
] | |
puts "What's for dinner?" | |
food = gets.chomp | |
if MEATS.include?(food) | |
puts "it's a meat" | |
elsif FRUITS.include?(food) | |
puts "it's a fruit" | |
elsif VEGETABLES.include?(food) | |
puts "it's a vegetable" | |
else | |
puts "We couldn't identify the food" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment