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 trial

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! :)