Question: Write a recursive function named get_multiples_of_3(numbers) that takes a list of integers as a parameter and returns a list of numbers which are divisible by


Write a recursive function named get_multiples_of_3(numbers) that takes a list of integers as a parameter and returns a list of numbers which are divisible by 3, in the same order as the given parameter. The function should return an empty list if there are no numbers which are divisible by 3 in the parameter list. Note: This function has to be recursive; you are not allowed to use loops to solve this problem! Write a recursive function named no_multiples_of_3(numbers) which takes a list of integers as a parameter and returns False if the parameter list contains any values which are divisible by 3, and returns True (i.e. all numbers are NOT divisible by 3) otherwise. Note: this function has to be recursive; you are not allowed to use loops to solve this problem! For example: Test Result print(no_multiples_of_3([2, 3, 5, 6])) False print(no_multiples_of_3([2])) True print(no_multiples_of_3([1, 3, 5, 7])) False print(no_multiples_of_3([])) True
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
