Seems like there might be a bug here


#1

Here is my code:
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 that language!"
end

I noticed that if I click 'Save & Submit Code' and then choose a language not on the list (ex. Spanish), the code passes. However, if I choose 'Save & Submit Code' and choose a language on the list, the code does not pass and I get the error: 'Oops, try again. It looks like your program doesn't default to printing 'I don't know that language.'

Seems like there might be a bug here, but it's still possible I'm doing something wrong.


5/20 When and Then: The Case Statement
#2

Looks to me like that is the objective of the lesson... Printing the default message. We should not mistake misfollowed instructions as a bug. Clearly in this case it is not.


#3

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