Output is OK but it drops an error


#1




Output is OK (it always display the correct messge), but Codecademy's corrector drops an error message such as "Oops, try again. It looks like your case statement doesn't puts 'Deleted!' when choice == 'delete'."


movies = {
    el_padrino: 5
}

print "Enter action: "
choice = gets.chomp
choice.downcase!

case choice
when "add"
    puts "Added!"
when "update"
    puts "Updated!"
when "display"
    puts "Movies!"
when "delete"
    puts "Deleted!"
else 
    puts "Error!"
end


#2

I don't believe we are asked to convert case on the inputs, just be sure the inputs are lowercase, already, so they work. This may be what the SCT is seening and does not have an appropriate message.


#3

Thanks for the feedback, but I already tried removing this line and still doesn't work. The strange think is that when I execute the script, the output message is correct, I do believe that Codecademy's corrector does not work properly.


#4

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