Using Python 2.7 how do I round my numbers to two decimal places rather than the 10 or so it gives?
print \"financial return of outcome 1 =\",\"$\"+str(out1)
The best, I think, is to use the format() function:
>>> print("financial return of outcome 1 = $ " + format(str(out1), '.2f')) // Should print: financial return of outcome 1 = $ 752.60
But I have to say: don't use round or format when working with financial values.