Update ops, try again. Make sure to test your program by choosing 'update'


#1

movies = {
"moon night" => 3
}
puts "Do u like it"
choice = gets.chomp
case
when "add"
puts "Add a movie!"
title = gets.chomp
puts "Give the moving rating from (0-4)!"
if movies[title.to_sym].nil?
puts "How much is rating (tyoe 0 - 4)"
rating = gets.chomp
movies[title.to_sym] = rating.to_i
else
puts " the movie already exists and not add anything to the hash"
end
when "update"
puts "tell us when update"
title = gets.chomp
if movies[title.to_sym].nil?
puts "the movie is not in the hash"
else

puts "make a new rating (type 0 - 4)"
rating = gets.chomp
movies[title.to_sym] = rating.to_i

end
when "display"
puts "Movies!"
when "delete"
puts "Deleted!"
else
puts "Error!"
end


#2

HI when you save & submit the code you should write on the console update