Replace this line with your code.


movies = {
    Titanic: 4,
    Elephant: 5,
    Isharkar: 3
puts "What Movie would you love to watch?"
choice = gets.chomp.downcase
case choice
when 'add'
  puts "What movie do you want to add?"
  title = gets.chomp
  if movies[title.to_sym].nil?
    puts "What's the rating? (Type a number 0 to 4.)"
    rating = gets.chomp
    movies[title.to_sym] = rating.to_i
    puts "#{title} has been added with a rating of #{rating}."
    puts "That movie already exists! Its rating is #{movies[title.to_sym]}."

when "update"
   puts "Updated!"
when "display"
   puts "Movies!"
when "delete"
   puts "Deleted!"
   puts "Error!"


What could be the problem with my code?


Please read the fourth instruction carefully:

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

Problem spotted? :wink: