Challenge Question 02 - for ... in ... loops


Instructions

Modify the sum function in sum.py from Tuesday’s virtual lesson so that instead of using a while loop, it uses a for ... in ... loop.

Then run the unit tests you wrote on Tuesday to ensure that your modification worked!

Upload your sum.py file to the autograder on Gradescope. You do not have to compress anything into a .zip file this time! Just upload the one sum.py file!

(If you want to keep your old version of the sum function, just rename it something like sum_old.)

Submission Instructions

Contributor(s): Alyssa Byrnes