livepython.net

62. Python Program to Find the Larger of Two Numbers

Easyelse and elif

Overview

Three possible answers: use if, elif and else.

Problem Statement

Read two whole numbers, one per line. Print the larger one, or say they are equal. For example, for 4 and 9:

Larger: 9

Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.

Input

One value per line, in this order. Example:

4
9

Output

The output for that example:

Larger: 9

The tests try 3 different inputs.

Learn this firstChapter 8 · Python if, else and elif Explained
solution.py
# write your code here

EXPECTED OUTPUT

1Larger: 9

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.