Objective
Create a Python program that tells which day of the week each date falls on. The weekday() method returns a number: 0 for Monday, 1 for Tuesday... 6 for Sunday.
Instructions
- Read an integer
nand thenndates, one per line, inYYYY-MM-DDformat. - Store the day names in a list (starting with Monday, capitalized:
Monday,Wednesday...) and use it with the result ofweekday(). - For each date show
YYYY-MM-DD: day.
3
2026-11-14
2026-01-01
2024-02-29
2026-11-14: Saturday
2026-01-01: Thursday
2024-02-29: Thursday
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise