fractions: Get Numerical Results in Fractions instead of Decimals
fractions: Get Numerical Results in Fractions instead of Decimals
Sometimes, you might prefer to get the results in fractions instead of decimals. If so, use a Python built-in function called fractions. The code above shows how it works.