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 one. Cursor wrote a function that classifies an HTTP status code into a category — "ok", "redirect", "client error", "server error", or "weird". The elif chain is mostly there but the function never returns anything (only the pass placeholder is at the bottom).

Replace the body so the function uses a chain that returns the right category for each range:

  • 200..299"ok"
  • 300..399"redirect"
  • 400..499"client error"
  • 500..599"server error"
  • anything else → "weird"

The script calls classify(404) and should print client error.

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.