Stumped by Ruby Exercise #8 Why Procs?


8. Why Procs? <-- click here

Oops, try again.
Did you create a proc called over_4_feet?

Replace this line with your code. 
# Here at the amusement park, you have to be four feet tall
# or taller to ride the roller coaster. Let's use .select on
# each group to get only the ones four feet tall or taller.

group_1 = [4.1, 5.5, 3.2, 3.3, 6.1, 3.9, 4.7]
group_2 = [7.0, 3.8, 6.2, 6.1, 4.4, 4.9, 3.0]
group_3 = [5.5, 5.1, 3.9, 4.3, 4.9, 3.2, 3.2]

# Complete this as a new Proc
over_4_feet = do |height|      <<-- isn't this it?
    height >= 4 
# Change these three so that they use your new over_4_feet Proc
can_ride_1 = {&over_4_feet}
can_ride_2 = {&over_4_feet}
can_ride_3 = {&over_4_feet}


I tried your code using a windows 8.1 IE11 environment and got a pass....
Have you tried

++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


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