promptdojo_

print, repr, and the f-string — step 8 of 9

Write three lines. Line 1: assign 12 to a variable called qty. Line 2: assign 3.5 to a variable called price. Line 3: print total: $42.00 using an f-string. The total comes from qty * price, formatted to two decimal places.

Expected output:

total: $42.00

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