4. Prompting: Redux! - Need help!


Keep getting an error message of: Oops, try again. It looks like you didn't add to the movies hash!
Can anyone help please???

movies = {
    Marvel: 4,
    Transformers: 3,
    Minions: 4
puts "what is your favourite?"
choice = gets.chomp
case choice 
when "add"
puts "what is the title?"
title = gets.chomp
puts "what is the rating?"
rating = gets.chomp
puts "#{title} has been added with a rating of #{rating}."
when "update"
puts "Updated!"
when "display"
puts "Movies!"
when "delete"
puts "Deleted"
    puts "Error!"


Did you study the example in Lesson 1? Have you read the lesson instructions carefully? The above line does not indicate that.


Thanks - I thought I had corrected this line but turns out I hadn't.

I still keep getting an error message - whenever I type in a movie title, it says it hasn't been added to the movies hash


So you are entering 'add' and then a movie title and rating? Be sure to write mutliple words in quotes.

"The Deep"


It still doesn't work no matter - I don't understand what im doing wrong?


Nevermind! Fixed it!


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