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 trialtamirg
6,201 Pointsworkspace is having technical issues
Hi, I tried the syntax correctly and it worked when I went back for review and tried the identical syntax it did NOT work. Just wanted to let you know.
car_speed = 55
speed_limit = 60
# Write your code here
too_fast = "true"
if car_speed > "speed_limit"
puts "false"
else car_speed < "speed_limit"
puts "true"
end
2 Answers
Kevin Gravett
11,167 PointsIf the code you have printed above is the code you entered for the 'Else Challenge', then your code is incorrect.
You might want to take a closer look at the challenge directions, then your too_fast
variable and your use of if / else
. As it is now, your too_fast
variable will be set to "true"
(a string) no matter what.
ttaleg
9,830 Pointsyou dont need all of those quotes around you left sided variables....i did it the same but i dont have the quotes
Tommy Gebru
30,164 PointsTommy Gebru
30,164 PointsHey Tami,
When writing out your solution it seems that you have set "strings" as a value to your variables . I suggest removing all parentheses except for the first one, too_fast="true"
Hope this helps