Oct-04-2018, 04:16 PM
(This post was last modified: Oct-04-2018, 04:16 PM by gruntfutuk.)
BAD:
BETTER:
but using
PS. Using floats when dealing with money is not usually a good idea. Work in cents or use the decimal package.
print(end='In 1 year, the tuition will be $' + str(totalOnePrice) + '.\n')
BETTER:
print(end='In 1 year, the tuition will be $' + '{:.12f}'.format(totalOnePrice) + '.\n')
but using
end=<str>
in such a way is, imho, a very bad practice.PS. Using floats when dealing with money is not usually a good idea. Work in cents or use the decimal package.
I am trying to help you, really, even if it doesn't always seem that way