-1

How do I print:

print(f"\nTotal amount inserted: ${total_money}")

So that total money will display to 2 decimal places?

0

1 Answer 1

0

You should specify the number of decimal places with the N in {num:.Nf}. For example:

>>> print(f'{2:.2f}')
2.00
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.