8.Display


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-0i8v1/0/8?curriculum_id=5059f8619189a5000201fbcb


So regardless of the fact that the code does work, and it displays the movie and rating, it keeps giving me the same error message:

Oops, try again. It looks like your 'puts' doesn't include The_Fifth_Element: 5.
.
I've run it on the terminal and works fine, I mean at this point I even copy pasted the code lines and still says there is an error


movies = {
    The_Fifth_Element: 5,
}
puts "What would you like to do?"
choice = gets.chomp.downcase
case choice
when "display"
    movies.each do |movie, rating|
        puts "#{movie}: #{rating}."
    end
end


#2

Hello :slight_smile:

You are right, your code is correct, but the codecademy tests are very strict.

Codecademy does not like the dot at the end of the puts:

puts "#{movie}: #{rating}"

#3

Oh my, you are right, I missed that one, thank you so much!


#4

You're very welcome :slight_smile:


#5

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