← Quiz: Modules and Libraries: all 14 questions
Quiz: Modules and Libraries · Question 10 of 14
What does this print? (code)
What does this print?
from datetime import date, timedelta
print(date(2026, 1, 25) + timedelta(days=10))
- A.2026-01-35
- B.2026-02-04
- C.2026-02-05
- D.An error
Answer & explanation
Correct answer: 2026-02-04
timedelta handles the month change: 6 days finish January and 4 more give 4 February.
Can you get the rest right without peeking?
Take the timed Quiz: Modules and Libraries quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →