Problem with 'display'


Having this same problem. This is my code:

when "display"
movies.each do |movie, rating|
puts "#{movie}: #{rating}"

My output is:

Input: display
space: 4
primer: 4
earth: 2

The error I get is:

It looks like your ‘puts’ doesn’t include space: 4.

I can’t move past the exercise

Display 8/10 won't work in Ruby

Please post a link to the exercise. Thanks.


Sorry, I thought I was replying to a post. It’s 8/10, Night at the Movies

The only way I got this to work was to manually ‘puts’ my first hash item, then have it print the rest. The output ended up looking like this:

Input: display
space: 4
space: 4
primer: 4
earth: 2

But I got through the exercise. Not sure what the problem was


The link will be more helpful, please.



Is you data symbolic?

movies = {
  :Crash => 4,
  :Babel => 4


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