promptdojo_

Diagnose any crash in one read — step 6 of 9

Cursor wrote this and the traceback ends with ValueError: invalid literal for int() with base 10: '7 dollars'.

The variable price_text has the dollar amount along with extra text. The fix is to pull just the number out before calling int(). Use .split() to grab the first token, then convert that.

The script should print price doubled: 14.

The break is on line 2 — but read the whole snippet first.

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