Will not pass


#1

The following is my code; I keep receiving the error "Oops, try again. It looks like you didn't add to the movies hash!" Perhaps I am overlooking something but could someone kindly help me figure out what's wrong. I have tried refreshing, clearing my cache, etc. and reviewing my code but am unsure what is wrong.

movies = {
Howls_Moving_Castle: 3,
The_Lion_King: 4,
Ponyo: 4,
Wall_e: 4
}

puts "What would you like to see?"
choice = gets.chomp

case choice
when "add"
puts "What is your movie title?"
title = gets.chomp

puts "What is your rating (0-4)?"
rating = gets.chomp

movies[title] = rating
puts "#{title} has been added with a rating of #{rating}!"
when "update"
puts "Updated!"
when "display"
puts "Movies!"
when "delete"
puts "Deleted!"
else
puts "Error!"
end


#2

this worked for me:

movies = {
Star_Wars_7: 10000000,
Star_Wars_6: 1000,
Star_Wars_3: 1000,
Star_Wars_1: -100
}
puts "What would you like to do?"
choice = gets.chomp
case choice
when "add"
puts "What is the title?"
title = gets.chomp
puts "And how would you rate it? -100 to 1000000000."
rating = gets.chomp
movies[title] = rating
puts "Added #{title} with a rating of #{rating}"
when "update"
puts "Updated!"
when "display"
puts "Movies!"
when "delete"
puts "Deleted!"
else
puts "Error!"
end

glad to help