(f'{}') Floating point rounding
f_string_rounding.py
# This program demonstrates how a floating-point
# number can be rounded.
amount_due = 5000.0
monthly_payment = amount_due / 12.0
print(f'The monthly payment is {monthly_payment:.2f}.')
f_string_rounding.py
# This program demonstrates how a floating-point
# number can be rounded.
amount_due = 5000.0
monthly_payment = amount_due / 12.0
print(f'The monthly payment is {monthly_payment:.2f}.')