Write a programBasic10 XPExercise 13/15

The largest and the smallest number

Task

The user enters whole numbers. The user enters the numbers one per line and ends with -1, which is not part of the result.

The program prints the largest and below it the smallest number entered. If no number was entered, it prints ziadne cisla (no numbers).

Examples

  • Input

    4
    9
    2
    -1

    Expected output

    9
    2

After you submit, 3 hidden tests will also check your solution: no numbers, one number, negative numbers.

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.