Challenge for Simple Debugging
Challenge
As in Trying Out Code, you again need to find the Sum of the Squares. This time sum the square of every other number from a
to b
, starting with a
. For example, sumOtherSquare(1,5) = 12 + 32 + 52 = 35.
The code below almost works, but not perfectly. Can you fix it?
Guideline: To find out what's wrong, use Error Printing.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.