Toggle navigation
Mr. Code's Wild Ride
Mr. Code
Curriculum
Showcase
Python
Math
Games
Typing
Sign in
Checkout Counter
Cost
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 4:
Show the cost of the first item to the user. Format the cost to two decimal places for the cents.
Hint:
Use
:.2f
to format a number to two decimal places:
print(f"The apples cost ${your_variable
:.2f
}.\n")
Last step
Next step
×
Sign in