Task 4 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

3.4 Methods — sum of squares

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

The helper square is already written above. Fill in sumOfSquares so that it returns the sum of the squares of a and b — by calling square, not by multiplying again yourself.

For sumOfSquares(3, 4) the program prints 25.

Your solution