14. Becoming More Selective - Need help!


#1



Keep getting a syntax error which says : Oops, try again. It looks like good_movies includes memento, but it shouldn't. Can anyone help???


movie_ratings = {
  memento: 3,
  primer: 3.5,
  the_matrix: 5,
  truman_show: 4,
  red_dawn: 1.5,
  skyfall: 4,
  alex_cross: 2,
  uhf: 1,
  lion_king: 3.5
}
# Add your code below!
good_movies = {
    movies_ratings.select {|movie, rating| rating > 3}


#2

Hi @jasmeetv ,

You assign a variable named movie_ratings here ...

movie_ratings = {

Make sure you use the exact same spelling later in the program.

Also, should the curly brace at the end of this line be there? ...

good_movies = {

#3

Thank you! My code works now!


#4

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