CJCoding With Joseph
15free / daySign inCreate account

Max Of Two

Write the body of max_of_two(left: int, right: int) -> int so it returns the larger of its two parameters using an if / else, without the built-in max; when they are equal either one is fine. The driver reads two whole numbers and prints what the function returns; leave it as it is. Input: two lines, each an integer, no prompts.

Expected Output:

9

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
Functions
📥 Auto-Input:
3\n9\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.