+ 2
Help me solve the code #0004
https://code.sololearn.com/cz3m4k83jOuj/?ref=app it gives output 1. i don't know how..?
2 Answers
+ 4
frac = Fraction (1,3) ----> frac = 1/3
frac += Fraction (1,2) ----> frac = frac + 1/2 = 1/3 + 1/2 = 5/6
frac += Fraction (1,6) ----> frac = frac + 1/6 = 5/3 + 1/6 = 6/6 =1
- 1
this docstring (coment)