Why am I getting syntax errors, yet it's moving on to the next task?



(ruby):4: syntax error, unexpected keyword_end, expecting $end

is_true = 2 == 3
    print "2 equals 3"
is_false = 2 != 3
    print "2 doesn't equal 3"


Hi Karl :slight_smile:

Why do you have the end keyword at the end of your code? It is only used to end blocks of code like in if statements, loops, methods, etc.


as gaurangtandon mentioned, you don't need 'end' in this case, that throws the syntax error. As for why its moving on, that is because the part the checks whether to go to next task checks if the output/result is they asked of you, which it is. that end confuses the computer, but only after it has printed out what the excercise wanted you to print out.