Ruby Ruby Basics Conditionals "if" Statements

Edward A. Polanco Murillo
Edward A. Polanco Murillo
2,650 Points

Not understanding this particular "IF" challenge.

Ive tried various methods to figure out the error that I am making. But, I keep getting the same error message from my previous post.

program.rb
def check_speed(50)
  if speed > 55
   check_speed = "too fast"
  end
  if speed < 55
   check_speed = "too slow"
  end
  if speed == 55
   check_speed = "speed OK"
  end
end 

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
53,479 Points

You are receiving this error because the parameter name should begin with a letter. Based on the rest of your code your parameter should be named speed instead of 50. Also you should be printing messages if they meet the specified condition.