Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python print fraction

>>> from fractions import Fraction
>>> Fraction(0.185)
Fraction(3332663724254167, 18014398509481984)
>>> Fraction(0.185).limit_denominator()
Fraction(37, 200)
Comment

PREVIOUS NEXT
Code Example
Python :: python encode file 
Python :: super title python 
Python :: Adding new column to existing DataFrame in Pandas using concat method 
Python :: flatten list 
Python :: what are test cases in python 
Python :: get first letter of each word in string python 
Python :: Kivy Python ListView Scrollview with Toggle on off 
Python :: dataframe look at every second column 
Python :: python remove a character from a string 
Python :: how to print in python 
Python :: delete element from matrix python 
Python :: if and else in python 
Python :: python check if ip is up or down 
Python :: dataframe python 
Python :: downgrade python version windows 
Python :: move object towards coordinate slowly pygame 
Python :: get discord guild members discord.py 
Python :: session in django 
Python :: print each element of list in new line python 
Python :: numpy create empty array 
Python :: regex find all french phone number python 
Python :: HTML template with Django email 
Python :: google sheet api python 
Python :: groupby get last group 
Python :: how to set global variable in python function 
Python :: string concatenation in python 
Python :: adding two strings together in python 
Python :: prevent selenium from closing 
Python :: insert into 2d array 
Python :: interpreter vs compiler 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =