Question: Please write a function named is evenodd split which takes an integer (and option- ally a bool) as input. If the parameter even on
Please write a function named is evenodd split which takes an integer (and option- ally a bool) as input. If the parameter even on left is True by default, the function should return true if all even numbers are on left side and all odd numbers on right side. If the parameter even on left is False, the function should return true if all odd numbers are on left side and all even numbers on right side. 1.1 Examples # Input: Integer x | Output: boolean #e.g. x = 14356 | False. (1 is left of 4) #e.g. x 246193 | True (Note: split does not need to be down the middle) 1 # e.g. x = 2419735, even_on_left = False | False (even numbers should be on the right) #e.g. x = 5379142, even_on_left = False | True
Step by Step Solution
3.51 Rating (144 Votes )
There are 3 Steps involved in it
Heres the Python function isevenoddsplit def isevenoddsplitx evenonleftTrue Convert integer ... View full answer
Get step-by-step solutions from verified subject matter experts
