Formatting Floats
This is example is not an f-string example. It also shows how to use the
\
(backslash) to break a line into two lines.
formatting.py
# This program demonstrates how a floating-point
# number can be formatted.
amount_due = 5000.0
monthly_payment = amount_due / 12
print('The monthly payment is', \
format(monthly_payment, '.2f'))