Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Tanzila Rafeeq
2,924 Pointsi keep getting a syntax error and i keep trying different things and they dont fix it they say its in line one.
no details
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
2 Answers

jb30
44,427 PointsThe 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.

Tanzila Rafeeq
2,924 Pointsbut i am using the end method to close it.