Consecutive Numbers (POTW)
Adapted from http://cemc.uwaterloo.ca/resources/potw/2012-13/POTWC-12-NN-PA-02-P.pdf, used with permission.
The number 90 can be expressed as the sum of 3 consecutive whole numbers. That is, 90 = 29 + 30 + 31. The number 90 can also be written as the sum of 4 consecutive whole numbers. That is, 90 = 21 + 22 + 23 + 24.
Using for loops (i.e. brute force), write a program that output the five consecutive numbers that total 220 and the 8 consecutive numbers that total 220.
Without using for loops, do the same thing, but this time use some mathematical logic for determining the numbers.
The output should look similar to the following:
90 = 29 + 30 + 31
Save as consecutive.py.