You are viewing a single comment's thread. Return to all comments →
Python solution
def catAndMouse(x, y, z): if abs(z - x) < abs(z - y): return "Cat A" elif abs(z - x) > abs(z - y): return "Cat B" else: return "Mouse C"
Seems like cookies are disabled on this browser, please enable them to open this website
Cats and a Mouse
You are viewing a single comment's thread. Return to all comments →
Python solution