Code executes with desired output but then shows there is a mistake


Oops, try again.
It looks like your program doesn't puts 'Bonjour!' when greeting == 'French'.
I have written the case statement corrently and I cant see any error.

puts "Enter desired greeting 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"


HI this line

when "French" then puts "Bonjour"

it's missing the ! after "Bonjour" then look again all the instruction


All the hello in other language should have the ! at the end


Silly me. Thanks. It worked.


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