Night at movies


#1



please help.
what is the problem with this code? 
<img src="//codecademy-discourse.s3.amazonaws.com/original/4X/9/0/1/9014060151181e6235ca720ccfaf6900a2f52a74.png" width="690" height="387">
Replace this line with your code.


Update
#2



whats wrong with this code?
movies = {
 Metro: 1,
 Matrix: 0,
 oslo: 3
 }
puts "What would you like to do?"
choice = gets.chomp

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}: #{rating}"
  else
    puts "That movie already exists! Its rating is #{movies[title.to_sym]}."
  end
end

puts movies

when "update"
puts "which movie to update?"
text=gets.chomp
if movie[title.to_sym].nil?
    puts "error!"
else
    movies[title.to_sym]
    puts "rate the movie out of 5"
    text=gets.chomp
    movies[title]=rating
end




Replace this line with your code.


#3

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