Skip to content Skip to sidebar Skip to footer
Showing posts with the label Fractions

Fraction Object Doesn't Have __int__ But Int(fraction(...)) Still Works

In Python, when you have an object you can convert it to an integer using the int function. For ex… Read more Fraction Object Doesn't Have __int__ But Int(fraction(...)) Still Works

Calculate Period Length Of Recurring Decimal Fraction

I want to do a program in python (3.6.5) that tell the length of e.g. 1/7. The output should be for… Read more Calculate Period Length Of Recurring Decimal Fraction