Answers for "how to represent numbers as fractions python]"

3

how to cnovert a decimal to fraction python

>>> from fractions import Fraction
>>> Fraction(0.25)
Fraction(1, 4)
Posted by: Guest on April-30-2021
2

simplify fractions python

>>> from fractions import Fraction
>>> Fraction(98, 42)
Fraction(7, 3)
Posted by: Guest on May-10-2020

Code answers related to "how to represent numbers as fractions python]"

Python Answers by Framework

Browse Popular Code Answers by Language