Ruby - Control Flow
Find the error in this Ruby code snippet:
number = 10 if number > 5 puts "Big" elsif number < 3 puts "Small" else puts "Medium"
Find the error in this Ruby code snippet:
number = 10 if number > 5 puts "Big" elsif number < 3 puts "Small" else puts "Medium"
if statements must end with end. The code snippet is missing end.elsif is correct in Ruby. puts can be used without parentheses. Comparison operators are correct.end to close the if statement. -> Option Bif needs end [OK]if with end [OK]elsif with else ifputs15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions