Question: For example: Test Result print('%s : %d' % ([2, 3, 5, 6], get_sum_evens([2, 3, 5, 6]))) [2, 3, 5, 6] : 8 print('%s : %d'

For example:
| Test | Result |
|---|---|
print('%s : %d' % ([2, 3, 5, 6], get_sum_evens([2, 3, 5, 6]))) | [2, 3, 5, 6] : 8 |
print('%s : %d' % ([9, 5, 15, 11, 23], get_sum_evens([9, 5, 15, 11, 23]))) | [9, 5, 15, 11, 23] : 0 |
print('%s : %d' % ([], get_sum_evens([]))) | [] : 0 |
Python plz.
Write a recursive function named get_sum_evens (numbers) which takes a list of integers as a parameter and returns the SUM of all even integers in the parameter list. The function should return 0 if there are no even numbers in the list. Note: you may not use loops of any kind. You must use recursion to solve this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
