Saturday, 24 October 2026
PastThree rungs, one idea. Solving rung 1 counts. Climb as far as you can.
Three Numbers
comparing three values
The biggest of three
Write a function called biggest
Return the largest of the three numbers. Two or all three may be equal, and that is fine — the largest value is still just that value.
Examples
| Input | Output |
|---|---|
| 1, 2, 3 | 3 |
| 5, 5, 1 | 5 |
| -1, -2, -3 | -1 |
| 0, 0, 0 | 0 |
There are extra hidden tests, so make it work in general, not just for these.
The one in the middle
Write a function called middle
Return the number that sits between the other two, so 3, 1, 2 gives 2. When values are equal the middle one is still whichever value ends up in the middle once they are in order: 5, 5, 1 gives 5. Neat route: add all three up, then take away the biggest and the smallest.
Examples
| Input | Output |
|---|---|
| 1, 2, 3 | 2 |
| 3, 1, 2 | 2 |
| 5, 5, 1 | 5 |
| 0, 0, 0 | 0 |
There are extra hidden tests, so make it work in general, not just for these.
Put them in order
Write a function called order_three
Return a list holding all three numbers, smallest first and largest last, so 3, 1, 2 gives [1, 2, 3]. Equal values simply sit next to each other, so 5, 5, 1 gives [1, 5, 5]. The list always has exactly three numbers in it.
Examples
| Input | Output |
|---|---|
| 3, 1, 2 | [1, 2, 3] |
| 1, 2, 3 | [1, 2, 3] |
| 5, 5, 1 | [1, 5, 5] |
| 0, 0, 0 | [0, 0, 0] |
There are extra hidden tests, so make it work in general, not just for these.
Finish Rung 1 and today counts. Rungs 2 and 3 are there if you want to push further.