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 trialSteven Martinez
2,146 PointsPlease Help: A bit lost on this question. I understand how to apply ELSIF to video example. This question lost me:
Help
car_speed = 55
speed_limit = 55
if car_speed < speed_limit
too_fast = false
else
too_fast = true
end
if car_speed = speed_limit
elsif answer = true
put going_speed_limit = true
end
3 Answers
John Fisher
7,974 PointsNot sure what the question is. Are you trying to rewrite this code as an elsif statement?
I think you could have something
if x < y
z == false
elsif x > y
z == true
else
stuff
end
is that what you mean?
Oscar Miguel Amezcua Estrella
7,355 PointsThe question say Set the return value of the "check_speed" method to the string "safe"depending on the following condition:
1.- The speed passed in as an argument is at least 40 2.-The speed passed in as an argument is less than or equal to 50
you should use the "&&" logical operator to acomplish this task
Im stock in that to and my english is bad :(
Quanton poulo
6,361 PointsHi,
I am also having trouble understanding this objective.
Set the return value of the "check_speed" method to the string "safe" depending on the following condition: The speed passed in as an argument is at least 40. The speed passed in as an argument is less than or equal to 50. You should use the "&&" logical operator to accomplish this task.
What is the answer to this objective?
thanks