Toggle navigation
Mr. Code's Wild Ride
Mr. Code
Curriculum
Showcase
Python
Math
Games
Typing
Sign in
Subscription Calculator
Cost
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 4:
Show the yearly cost 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 yearly cost is ${your_variable
:.2f
}.\n")
Last step
Next step
×
Sign in