3. The case statement error



Hello, i've got a problem on this step

when i run the code, it always show "It looks like your case statement doesn't puts 'Added!' when choice == 'add'."

Can anybody help me, please?Because I think my code has no problem.

movies = {
    "AADC" => 4

puts "What would you like to do?"
puts "-- Type 'add' to add a movie."
puts "-- Type 'update' to update a movie."
puts "-- Type 'display' to display all movies."
puts "-- Type 'delete' to delete a movie."
print "input the option : "
choice = gets.chomp.downcase

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


You will have to change your

puts "input the option : "


Thanks :smiley: finally the code works well


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