4 Prompting: Redux


4 Prompting: Redux

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

movies = {
    "layercake" => 5

puts "enter choice"

choice = gets.chomp

case choice
when "add"
puts "What movie would you like to add?"
title = gets.chomp   
puts "What's the rating of the movie?"
rating = gets.chomp

movies = {}

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!"

WHAT AM I DOING WRONG? Gone from not adding title to the movies hash to now it wont even register the title.


Hi @moonmano,

Are you still stuck on this exercise?


There is no need to create new movies here

delete that line and it should work


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