5. When and Then



My code is technically passing, but when I enter the "approved" languages (i.e. English, French, etc.), every response I get in the console is my else statement saying, "I don't know that language!". Is this a bug, or have I done something wrong?

puts "What's your favorite language?"
language = gets.chomp

# Add your case statement below!
case greeting
when "English" then puts "Hello!"
when "French" then puts "Bonjour!"
when "German" then puts "Guten Tag!"
when "Finnish" then puts "Haloo!"
else puts "I don't know that language!"


The variable should be the same in both statements.

greeting = gets.chomp


That's awesome, it worked. I appreciate it.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.