|
@ -30,4 +30,7 @@ def multiplyFractions(num1, denom1, num2, denom2): |
|
|
return reduceFraction(result_num, result_denom) |
|
|
return reduceFraction(result_num, result_denom) |
|
|
|
|
|
|
|
|
def divideFractions(num1, denom1, num2, denom2): |
|
|
def divideFractions(num1, denom1, num2, denom2): |
|
|
return multiplyFractions(num1, denom1, denom2, num2) |
|
|
|
|
|
|
|
|
return multiplyFractions(num1, denom1, denom2, num2) |
|
|
|
|
|
|
|
|
|
|
|
def fraction_to_string(num, denom): |
|
|
|
|
|
return str(num) + " / " + str(denom) |