7. update


Help! I seriously can not figure out what I am supposed to do, any advice will be good at this point.

movies = {
"American Gangster" => 9
puts "What's your favorite movie?"
choice = gets.chomp

choice = case
when "add"
puts "Add a movie: "
title = gets.chomp
puts "What rating would you give this movie (0-4)?"
rating = gets.chomp
movies[title.to_sym] = rating.to_i
puts "#{title} " + "has been added with a rating of " + "#{rating}"
when "update"
puts "Updated!"
when "update"
puts "Updated!"
when "display"

puts "Movies!"
when "delete"
puts "Deleted!"
puts "Error!"
if movies[title.to_sym].nil? == true
movies[title] = (rating)
puts "that movie already exists..."

The error it keeps giving me is:
"Oops, try again. Make sure to test your program by choosing 'update'."


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