7. Update (SCT Error)



My code seems to work perfectly, but I keep getting an error message that says "SCT error" and I cannot move on to the next lesson. Please help!

movies = {
  Pans_Labyrinth: 5
puts "What would you like to do to the list?"
user_input = gets.chomp

case user_input
  when "add"
  	puts "Movie title:"
  	new_title = gets.chomp.to_sym
  	puts "Rating: "
  	rating = gets.to_i
  	if movies[new_title.to_sym].nil?
      movies[new_title] = rating
      puts "That movie already exists!"
  when "update"
  	puts "Movie title:"
  	title = gets.chomp.to_sym
  	if movies[title].nil?
      puts "That movie is not on the list."
      puts "New rating:"
      new_rating = gets.to_i
      movies[title] = new_rating
      puts "#{title} has been updated with new rating of #{new_rating}."
  when "display"
  	puts "Movies!"
  when "delete"
  	puts "Deleted!"
  	puts "Error!"


Hi @b.kehl :smiley:
I just ran your code in the Codecademy Ruby interpreter, and everything does work perfectly! What I would do is simply refresh the page, copy and paste your code when you reset the lesson, or just report that big.

I hope this helps!


Okay, thank you for your help! It's still not working, so I will try reporting a bug.


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