Write total(nums) that adds up a list using a while loop and an index.
total([1, 2, 3]) → 6
total([]) → 0
Submit runs 4 tests, including hidden edge cases.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.