How to multiply two fractions in Python

1 Answer

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


'''
run:

3

'''

 



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

Related questions

1 answer 154 views
1 answer 150 views
150 views asked Apr 11, 2019 by avibootz
1 answer 158 views
158 views asked Apr 11, 2019 by avibootz
1 answer 175 views
1 answer 178 views
1 answer 89 views
...