Write a programExercise 2/4Basic10 XP

A date as a tuple

Task

The program reads a date as day.month.year (for example 1.10.2026), stores it as a tuple of three whole numbers and prints it. On the next line it prints the date as year-month-day with a two-digit month and day:

(1, 10, 2026)
2026-10-01

Examples

  • Input

    1.10.2026

    Expected output

    (1, 10, 2026)
    2026-10-01

After you submit, 3 hidden tests will also check your solution: the end of the year, a one-digit day and month, zeros in the input.

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.