How to divide two fractions in Python

1 Answer

0 votes
from fractions import Fraction 
  
print(Fraction(18, 3) / Fraction(1, 2))


'''
run:

12

'''

 



answered Apr 11, 2019 by avibootz
edited Apr 11, 2019 by avibootz

Related questions

1 answer 234 views
1 answer 232 views
232 views asked Apr 11, 2019 by avibootz
1 answer 239 views
239 views asked Apr 11, 2019 by avibootz
1 answer 258 views
1 answer 283 views
1 answer 299 views
...