PYTHON CODING
- waclaw_koscielniak
- Sep 19
- 1 min read
from fractions import Fraction
f1 = Fraction(3, 4)
f2 = Fraction(2, 3)
result = f1 * f2 + Fraction(1, 6)
print(result, float(result))
from fractions import Fraction
f1 = Fraction(3, 4)
f2 = Fraction(2, 3)
result = f1 * f2 + Fraction(1, 6)
print(result, float(result))
[Running] python3 -u "/Users/name/test/test483.py"
2/3 0.6666666666666666
[Done] exited with code=0 in 0.071 seconds

Run it.