We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Sum Game 2

Assignment

The sum_of_odd_numbers function should calculate the sum of all the odd numbers starting at 1 up to (but not including) the given end number and return the result.

Fix the loop so that it iterates over the correct numbers.

Tip

How much should you increment by in each iteration of the loop to get the next odd number?