Question: Use Python to write a recursive function sumlist(my_list) to calculate the sum of the numbers in a list my_list passed as a parameter. The sum
Use Python to write a recursive function sumlist(my_list) to calculate the sum of the numbers in a list my_list passed as a parameter. The sum of a list is the sum of the head (first element) plus the sum of the tail (all the other elements). Test your function by creating a program that uses sumlist to calculate and print the sum of the following list:
my_list = [7, 5, 4, 27, 52, 42, 13, 17]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
