Hi,
I'm trying to round my float total to the nearest .05 cents.
12.01 should produce 12.00
0.14 should produce 0.10
2.28 " 2.25
703.81 " 703.80
"%.02f"%100.009 9 produces 100.01 (which I know is right)
No combination of round and/or "%.02f" works for me.
What's the best way to get there? Should I write a function to manage my
rounding or is there a simpler/better way?
TIA
T
I'm trying to round my float total to the nearest .05 cents.
12.01 should produce 12.00
0.14 should produce 0.10
2.28 " 2.25
703.81 " 703.80
"%.02f"%100.009 9 produces 100.01 (which I know is right)
No combination of round and/or "%.02f" works for me.
What's the best way to get there? Should I write a function to manage my
rounding or is there a simpler/better way?
TIA
T
Comment