When and Then: The Case Statement


puts "Hello there!"
greeting = 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 language!"

When I type spanish to the console, this comes up:

Hello there!
I don't know language!

Which is correct but, I have warning at the bottom:

Oops, try again. It looks like your program doesn't default to printing 'I don't know that language!'

Please help what is wrong?


Compare the error message to your output. See the difference? Some lessons are literally expecting the text given in the instructions.