7. Update (SCT Error)

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-ruby/lessons/a-night-at-the-movies/exercises/update?action=lesson_resume

<In what way does your code behave incorrectly? Include ALL error messages.>
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
else
puts “That movie already exists!”
end
when “update”
puts “Movie title:”
title = gets.chomp.to_sym
if movies[title].nil?
puts “That movie is not on the list.”
else
puts “New rating:”
new_rating = gets.to_i
movies[title] = new_rating
puts “#{title} has been updated with new rating of #{new_rating}.”
end
when “display”
puts “Movies!”
when “delete”
puts “Deleted!”
else
puts “Error!”
end

<do not remove the three backticks above>

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.

1 Like

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