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! While you're at it, check out some resources Treehouse students have shared here.
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 trialEdward A. Polanco Murillo
2,872 PointsNot understanding this particular "IF" challenge.
Ive tried various methods to figure out the error that I am making. But, I keep getting the same error message from my previous post.
def check_speed(50)
if speed > 55
check_speed = "too fast"
end
if speed < 55
check_speed = "too slow"
end
if speed == 55
check_speed = "speed OK"
end
end
1 Answer
KRIS NIKOLAISEN
54,972 PointsYou are receiving this error because the parameter name should begin with a letter. Based on the rest of your code your parameter should be named speed
instead of 50. Also you should be printing messages if they meet the specified condition.
Edward A. Polanco Murillo
2,872 PointsEdward A. Polanco Murillo
2,872 PointsGot it thanks for the help.