8 - Display - Ooops, tray again errro


#1

Working on Night at the movies and getting same error many others are but have yet to see a solution that fits my case when working on 8 - Display.

I get the "Oops, try again. It looks like your 'puts' doesn't include Memento: 3." error.

I have verified, re-verified spacing multiple times. Copied and pasted straight from the instructions and nothing seems to work. I'm sure it's something obvious but am unable to figure it out. I have looked through other's posts to no avail.

Any thoughts?

movies = { Memento: 3, Primer: 4, Ishtar: 1}
print "What is your choice? "
choice = gets.chomp
case choice
    when "add" 
        print "What is thew new movie? "
        title = gets.chomp;
        print "What is the moving rating? "
        rating = gets.chomp;
        if movies[title.to_sym].nil?
            movies[title.to_sym] = rating.to_i
            puts "The movie #{title} was added to the list!"
        else
            puts "Movie #{title} already exists"
        end
    when "update"
        print "What movie do you want to update? "
        title = gets.chomp;
        print "What is the new moving rating? "
        rating = gets.chomp;
        if movies[title.to_sym].nil?
            puts "Movie #{title} does not exists"
        else
            movies[title.to_sym] = rating.to_i
            puts "The movie #{title} been updated!"
        end
    when "display"
        movies.each do |movie, rating|
            puts "#{movie}: #{rating}"
        end
    #when "display" 
    #    movies.each { |title, rating| puts "#{title}: #{rating}"}
    when "delete" 
        puts "Deleted"
    else 
        puts "Error!"
end

#3

In line 2 replace print with puts.

https://www.codecademy.com/forum_questions/54cee3899113cbab350047bd


#4

wow - thanks. Tried and worked.

Banged my head on that one for some time now.