Text Formatting Exercise
Question 1 of 4
Which f-string correctly formats a float to 2 decimal places?
price = 19.999
# Format to show exactly 2 decimal places
result = ?
print(result) # Should output: Price: $20.00f"Price: ${price:.2d}"
f"Price: ${price:2f}"
f"Price: ${price:.2f}"
f"Price: ${price:2.f}"