4/10 Prompting Redux


I am stuck on 4/10 "Prompting Redux" and i cannot figure out where i am going wrong. the error message keeps saying "Oops, try again. It looks like you didn't add to the movies hash!"
Where am I going wrong?

movies = {
    "The Nanny" => 1,
    "I dont know" => 2,
    "Rash decisions" => 3,
    puts "What do you want to see?"
    choice = gets.chomp
case choice
when "add"
    print "What is the movie title?"
    title  = gets.chomp
    print "What is the movie rating?"
    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!"
    puts "Error!"


I'm not getting an error when I run your code. Try reloading/refreshing your web page and running it again.

Your first question is a bit odd though. I would expect something more along the lines of "What do you want to do? (add, update, display)"


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