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.
I can't my coding error
It keeps returning syntax errors
def check_speed(car_speed) if (car_speed >= 40) && (car_speed is <= 50) puts "safe" else puts "unsafe" end
Jason AndersTreehouse Moderator 145,631 Points
In addition to Ari's point of the missing
end, there are also two other errors that will prevent you from passing.
- The instructions explicitly ask to
returnthe strings, but you are using
- In the
ifconditional, the second part, you have the word "is" in there for some reason. It should read like the first part (no "is").
Fix up what Ari pointed out, and correct these two, and the challenge will pass.
Keep Coding! :)
Ari Misha19,274 Points
Hiya Ben! You forgot to close your "if" statement with "end" keyword. Do that and you're good to go. (: