Write a programElementary20 XPExercise 5/15

Even and odd, sorted

Task

The user enters whole numbers from 100 to 1000 (inclusive), each on its own line. The first number outside the interval ends the input and is not part of the result.

The program prints two lists: the even numbers on the first line, the odd ones on the second - both sorted from the largest to the smallest.

Examples

  • Input

    150
    333
    200
    999
    0

    Expected output

    [200, 150]
    [999, 333]

After you submit, 3 hidden tests will also check your solution: the first number is outside, the bounds 100 and 1000, repeated 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.