8 display HELP!PLEASE!


#1

This is my code:
movies ['Hotel Marygold'.to_sym]= 4

puts "Select your movie."
choice = gets.chomp.downcase

case choice

when 'add'
puts "Type the title please"
title = gets.chomp
puts "What is the rating? (Enter 0 - 5)"
rating = gets.chomp
if movies[title.to_sym].nil?
movies[title.to_sym]=rating.to_i
puts "Title and the rating of the movie has been added"
else
"Title and the rating of the movie has already existed"
end
movies[title] = rating
puts "#{title} has been added with a rating of #{rating}"

when "update"
puts "What is your movie to update?"
title = gets.chomp
if movies['Hotel Marygold'.to_sym].nil?
puts "Error: Movie non-existent."
else
puts "What is your new rating?"
rating = gets.chomp
movies['Hotel Marygold'.to_sym] = rating.to_i
end
when "display"
movies.each[movie/rating ]
puts "#{movie}:#{rating}"
end
when "delete"
puts "Deleted!"
else
puts "Error!"
end


#2

where the 'Hotel Marygold' come from ?, just use "title" directly