14. Becoming more selective


#1



Hi,
I'd be very grateful for advice as to why my code isn't correct? It says it isn't a hash but having looked at other posts on this section, I've written the same as everyone else...as far as i can see anyways!
thanks :slight_smile:

Oops, try again. It looks like good_movies isn't a hash.


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 = movie.ratings.select { |movie, rating| rating > 3 }


#2

movie.ratings.select

your hash name is movie_ratings not movie.ratings


#3

Thank you, it seems obvious now!


#4

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