Crowe LLP Interview Question

Critique a python function