promptdojo_
Checkpoint

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

Last drill. Convert a CSV into JSONL.

Write a function csv_to_jsonl(csv_path, jsonl_path) that:

  1. Opens csv_path with csv.DictReader (remember newline="").
  2. For each row, converts the score column from string to int.
  3. Writes one JSON object per line to jsonl_path.
  4. Returns the number of rows written.

The starter writes a tiny CSV, calls your function, then reads the JSONL back and prints each parsed record's name and score.

Expected output:

3
alex 82
sam 91
jordan 77

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.