|
@ -9,8 +9,8 @@ def dec_to_frac(dec_number): |
|
|
|
|
|
|
|
|
def reduceFraction(num, denom): |
|
|
def reduceFraction(num, denom): |
|
|
gcdOfFraction = gcd(num, denom) |
|
|
gcdOfFraction = gcd(num, denom) |
|
|
num /= gcdOfFraction |
|
|
|
|
|
denom /= gcdOfFraction |
|
|
|
|
|
|
|
|
num = divide(num, gcdOfFraction) |
|
|
|
|
|
denom = divide(denom, gcdOfFraction) |
|
|
return (num, denom) |
|
|
return (num, denom) |
|
|
|
|
|
|
|
|
def addFractions(num1, denom1, num2, denom2): |
|
|
def addFractions(num1, denom1, num2, denom2): |
|
|