Write a programExercise 2/4Elementary20 XP

The largest of three

Task

Write a function max3(a, b, c) that returns the largest of three numbers. Do not use the built-in max or sorting.

Examples

  • Call

    print(max3(3, 9, 4))

    Expected output

    9

Rules

  • Solve it with conditions - no max and no sorting.

After you submit, 7 hidden tests will also check your solution: the largest comes first, the largest comes last, two equal largest, negative numbers, decimal numbers, all zeros, the result is returned.

Python starts the first time you run code.

Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.

Input (stdin)

Each line = one call to input().

Output

Hints

Try it yourself first. Each hint reveals a little more - and lowers the reward a little.

Signed out, hints are free - but no XP is awarded either.

Solution

The solution unlocks after the last hint.