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.

Ruby Ruby Operators and Control Structures Ruby Control Structures Else challenge

I can not figure this out!

I dont get it! Help!

ruby.rb
car_speed = 55
speed_limit = 60

too_fast == true
if car_speed > speed_limit 
  if  car_speed < speed_limit 
  end 

2 Answers

It seems you are getting started with ruby, I can't check your profile to see what other ruby courses you have taken but I suggest you follow the ruby track from the beginning if possible.

= is for assigning something to something while == checks if something is equal to something for the if-else you need to assign true to the variable it told you so == is wrong there.

I will explain what the question is asking from you in a kind of pseudocode, if you still can't solve it with that then let us know.

~~

If car_speed > speed_limit

make too_fast variable true (because the car is over the speed limit so it is definitely way too fast)

else (which means the car speed is not above the speed limit)

make too_fast variable false (because that means the car is not too fast)

end

~~

I hope this helps you understand what it wants from you in some way.

Thank you it worked! :)