🐛 Bug of the day

Formatter crashing on valid prices

easy

format_price(amount) should return the amount formatted as a price string, e.g. format_price(5) -> "$5".

Symptom: Calling format_price(5) crashes with: TypeError: can only concatenate str (not "int") to str.

Open with hints ↗Runs in your browser. No account needed.

Debugging practice from BugHunt, free, in your browser.