Question: Write a function called basic_sum(numbers) that takes as input a list of numbers. The list of numbers can be any length. Add all the numbers
Write a function called basic_sum(numbers) that takes as input a list of numbers. The list of numbers can be any length. Add all the numbers in the list together and return the answer as output.
Note:
- You must use a while loop in your answer
- Your function should return the sum, you are not supposed to print it or do anything else.
| Test | Result |
print(basic_sum([8,9,10,11])) | 38 |
print(basic_sum([-10,11])) | 1 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
