learn-python
learn-python copied to clipboard
Update shipping.py
trafficstars
After completing https://www.codecademy.com/courses/learn-python-3/projects/python-sals-shipping. I noticed how my version is different to the accepted answer. coming from a browser orientated javascript background I never really have had to worry about numerical calculations and number types. However coming into python, I am starting to consider the correct use of different numbering systems in programming.
Arguably price should be an integer as it is discrete data. Even in our simple calculations, using a float for currency starts to deviate our results slightly rather than using an integer.