runtime
19 / 500
question 19 Variables & Data Types · medium

The price that crashes the till

The till reads a typed price and prints it. With the price 4.50 it stops with an error. Fix it so any typed price, with or without cents, prints as a decimal.

Typed line4.50 here; Check also types other prices, including a whole number
PrintsPrice? Price: 4.5
Expected output1 line · typed 4.50
  1. 1Price? Price: 4.5

Loading your progress…

The price that crashes the till — Python practice · Runtime