Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
i keep getting a syntax error and i keep trying different things and they dont fix it they say its in line one.
def check_speed(80) if check_speed < 55 puts "too fast" end if check_speed > 55 puts "too slow" end if check_speed == 55 puts "speed OK" end
The challenge doesn't want you to specify the number to pass in to the method. It wants you to use a variable to represent a number, such as by using
def check_speed(speed), then checking if the value for the variable is less than, more than, or equal to 55.
You should also close your last if statement with
end so that the if statement ends and the check_speed class ends.
but i am using the end method to close it.