The Middle Judge

Python FundamentalsEasy+10 XP+10

The Middle Judge

Three judges each give a score. To stop one harsh or generous judge from swinging things, the contest uses the middle score — the one that's neither the lowest nor the highest.

Task: write middle_score(a, b, c) that returns the middle of the three numbers.

  • If some scores are equal, the middle is still the one in the centre once they're in order. For example, the middle of 7, 9, 7 is 7.

Examples

a = 6
b = 9
c = 4
returns 6
a = 1
b = 2
c = 3
returns 2

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run