I was doing this assignment:
And was just wondering why the drone shipping gives such a weird value with all the decimal places?
The calculation is 9 * 4.8, shouldn’t it just equal to 43.2?
Unfortunately it’s a rather generic problem, you can read about floating point on wikipedia or otherwise and the python docs cover it fairly clearly (and offers a few options for cleaner representation): 15. Floating Point Arithmetic: Issues and Limitations — Python 3.9.4 documentation