Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python rational numbers

from fractions import Fraction

Fraction("0.2").as_integer_ratio()
# (1, 5)
# so much better
Source by antonz.org #
 
PREVIOUS NEXT
Tagged: #python #rational #numbers
ADD COMMENT
Topic
Name
2+3 =