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 trialMarguerite Holden
6,075 PointsHow do I set the variable too_fast to make it a true staement?
Set a variable called too_fast?
car_speed = 65
speed_limit = 60
too_fast >= 60
if car_speed > speed_limit
puts "Car speed exceeds the speed limit"
end
2 Answers
andren
28,558 PointsI think you might be overthinking this challenge a bit, they are not asking you to set too_fast to a true statement. All they are asking is to set a variable called too_fast to the value true, if car_speed is greater than speed_limit, like this:
car_speed = 65
speed_limit = 60
if car_speed > speed_limit
too_fast = true
end
Marguerite Holden
6,075 PointsThanks for the advice and the info.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsCorrect.
Marguerite Holden, keep in mind that the challenges are designed with very specific goals and very picky code checkers. If you deviate from the instructions (add what isn't asked for or deleted what was pre-loaded), you will get a "Bummer". Here, for example, the challenge did not ask for a
puts
statement. It just wanted a conditional checked and a value assigned appropriately.This is just to assist your future Treehouse learning experience... Pay very close attention to the Challenges instructions and don't modify what should be, and only add what is explicitly asked for. :)
Keep Coding!