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.
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.
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.