Fractions

[latexpage] If you have nightmares from trying to deal with fractions from your school days, Python's Fraction data type may be just what you need. A Fraction is an object…

Continue ReadingFractions

Decimals

We've seen that floats in Python can sometimes be inaccurate due to roundoff error.  One way to correct this is to use Python's Decimal data type. A Decimal variable allows…

Continue ReadingDecimals