What am I doing wrong? I am stuck and may not understand the question


#1




(ruby):2: syntax error, unexpected tIDENTIFIER, expecting '}'
movies["three"] = 3
^
(ruby):4: syntax error, unexpected '}', expecting $end


Replace this line with your code. 
movies = {
    "Training Day" => 7
    movies["three"] = 3
    puts 7 + movies["three"]
}

puts "So what is his favorite movie?"
puts "The movie pair was added"

answer = gets.chomp

case choice
when "add" 
  puts "Give me a movie title"
  title = gets.chomp
  puts "Please rate the movie"
  rating = gets.chomp
when "update"
  puts "Updated!"
when "display"
  puts "Movies!"
when "delete"
  puts "Deleted!"
else 
  puts "Error!"
end


#2

Look up the syntax for the statement where your syntax error is, in this case a hash
https://www.google.com/search?q=ruby+hash


#3

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