Question: Python Define a recursive function named count_over_50 (scores) that takes a list of integers as a parameter and returns the number of scores which are
Python
Define a recursive function named count_over_50 (scores) that takes a list of integers as a parameter and returns the number of scores which are greater than 50. Note: You may not use loops of any kind. You must use recursion to solve this problem. For example: Test Result 2 numbers = [15, 42, 55, 92, 11] print(count_over_50(numbers)) numbers = [55, 22, 75, 92, 56, 89, 23, 45] 5 print(count_over_50(numbers)) numbers = [] print(count_over_50(numbers))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
