Question: Exercise 6.4 Sum of list Complete the code below by defining the two functions readList () and calsum () as explained below. myList = readList

Exercise 6.4 Sum of list Complete the code below by defining the two functions readList () and calsum () as explained below. myList = readList () sum = calSum (myList) print (sum) readList ( ) : Read numbers from user until zero is received, return the list of input numbers. calsum (myList ) : Calculate the sum of the values in the list and return it. Remarks: To add a number x into a list a, we can use append() (e.g. a.append(x)). Sample Test Cases: Input Expected Output 6 OWN- 150
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
