Ruby Ruby Basics Conditionals "if" Statements

Mehmet Buyukakarsu
Mehmet Buyukakarsu
2,171 Points

I am unable to pass this test and do not know which code can

Define a method named check_speed that takes a single number representing a car's speed as a parameter. If the speed is over 55, check_speed should print the message "too fast". If the speed is under 55, check_speed should print the message "too slow". And if the speed is exactly 55, check_speed should print the message "speed OK".

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,287 Points

You could review this video and base your check_speed method on the code for price starting @ 3:39. However you will have print statements instead of assignments. That should get you started.