A simple Python solution
Define a function that takes two numbers as arguments. If both numbers are even, return the smaller one of them. If one numbers or both is odd, return the larger number between the two.
Define a function that takes two numbers as arguments. If both numbers are even, return the smaller one of them. If one numbers or both is odd, return the larger number between the two.