Question: Question 2 : Recursion ( 2 0 marks ) Implement the following functions using recursion in the file recursion.py . Please check test _ recursion.py
Question : Recursion marks
Implement the following functions using recursion in the file recursion.py Please check
testrecursion.py to understand the expected behavior of each function. There are no marks
for nonrecursive implementations or functions that rely on sorting.
a reorderlistofletters marks
This function takes a Python list of onecharacter strings and should reorder the
elements so that all vowels precede all consonants and return the modified list. If the
arguments elements are such that vowels precede consonants, then the order of the
elements must not be modified. The function must not change the given argument
listofletters
b isalternatingnumbers marks
This function should return True if the string numbers consists of alternating s and s
and False otherwise.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
