Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python print fraction

>>> from fractions import Fraction
>>> Fraction(0.185)
Fraction(3332663724254167, 18014398509481984)
>>> Fraction(0.185).limit_denominator()
Fraction(37, 200)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #print #fraction
ADD COMMENT
Topic
Name
2+2 =