logo CodeStepByStep logo


Language/Type: Python errors if/else return string

The following function attempts to return the median (middle) of three integer values, but it contains logic errors. In what cases does the function return an incorrect result? How can the code be fixed? Determine what is wrong with the code, and submit a corrected version that works properly.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.