Prompting: Redux


#1

** EDIT: The error was, used 'answer', but called for 'choice'. Changed and got the go ahead green! :slight_smile:

I was alright, until step four. This is what I have so far, but the error message that I keep returning to is: Oops, try again. It looks like you didn't add to the movies hash!

movies = {
    this_is_a_movie: 3,    
}
puts "What do you want to do?"
answer = gets.chomp

case choice
when "add"
    puts "Movie title?"
    title = gets.chomp
    puts "Movie rating?"
    rating = gets.chomp
    movies [title] = rating
    puts "#{title} has been added with the rating of #{rating}."


#2

Hi these line

answer = gets.chomp

case choice

you should save gets.chomp inside choice instead of answer


#3

movies = {
this_is_a_movie: 3,
}
puts "What do you want to do?"
answer = gets.chomp

case choice
when "add"
puts "Movie title?"
title = gets.chomp
puts "Movie rating?"
rating = gets.chomp
movies [title] = rating
puts "#{title} has been added with the rating of #{rating}"
why this isn't working