🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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))
  1. A.2026-01-35
  2. B.2026-02-04
  3. C.2026-02-05
  4. 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 →