promptdojo_

Aliases, multi-imports, and the `np.` you'll see everywhere — step 9 of 9

Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

Last one. Cursor wrote a one-page script that's supposed to print today's year using datetime, but the imports are wrong. Three things to fix:

  1. The first line uses import datetime as dt but then later calls datetime.now() directly — those don't match.
  2. The second line from datetime import * is the antipattern. Replace it with a targeted from datetime import datetime.
  3. After fixing the first two, the third line works on its own — but remove the redundant first line entirely. You only need one of the two ways to reach datetime.now().

After the fix, the script should print 2024 — the year of the fixed datetime(2024, 6, 15). We use a fixed date instead of datetime.now() so the grader stays deterministic across calendar years.

full-screen editor opens — close anytime to keep reading.