When and Then: The Case Statement


#1

The output is correctly displayed, but the tutorial is stating that it does not pass. I feel like I can find the solution its looking for specifically, but I also feel that this should be an acceptable solution. Thoughts?

print "Hello there! Please state preferred language: "
greeting = gets.chomp

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!"
end


#2

Just kidding. The missing item was as simple as the original statement.

Since it was:: print "Hello there! Please state preferred language: "
rather than:: puts "Hello there! Please state preferred language: "

Once changed to puts, the program passed. Silly discrepancy at this point but might be what's keeping your program from passing!