Prompting redux


#1

Hi! I cant figure out what i didnt do right. Anyone could hint or explain me? Merci!

movies = {
"the lion king" => 5
}
puts "What do you want to do? (add, update, display, delete)"
choice = gets.chomp

case choice
when "add"
puts "What movie would you like to add?"
title = gets.chomp
if movies[title].nil?
puts "enter your movie rating"
rating = gets.chomp
movies[title] = rating
puts "#{title} has been added with #{rating}"
else
"that movie already exists!"
when "update"
puts "updated"
when "display"
puts "Movies"
when "delete"
puts "Deleted"
else
puts "Jammer de bammer"
end


#2
        What codecademy says i should do:

Great! Let's build out each part of the case, one step at a time. We'll start with the add branch.



        Instructions


        Inside your when "add" block, remove the puts "Added!" statement.In its place, prompt the user for a movie title. Save the result in a new variable called title. (*Your code already has an example of how to do this!)Next, prompt the user for the rating of the movie. Save that in a new variable called rating.Add that movie/rating pair to the movies hash and puts a message indicating the pair was added. (No need for to_sym or to_i just yet!)

#3

figured it out! forgot to close something ^^


#4

it keeps asking this:

Oops, try again. Did you create a variable called title?