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 Booleans Ruby Booleans Boolean Review

Stuck here. Please help

This challenge has me stooped

boolean.rb
car_speed = 50
speed_limit = 45
if car_speed > speed_limit 

2 Answers

Christopher Nowack
Christopher Nowack
2,468 Points

Hey Hunter, your if statement just needs to contain the method name. Hope this helps..

if car_speed > speed_limit
  flash_car_speed
else
  display_car_speed
end

[MOD: switched to answer, edited code block & removed brackets - srh]

Dimitrios Kavadas
Dimitrios Kavadas
2,942 Points

Hunter, Christopher has it right. Your Boolian is a test of a method. It sees IF the statement is true, and returns true or false. It won't end unless you tell it to, so don't forget to add END, as the function will still evaluate (look for) any other statements like ELSE.

Good Luck