+ 1

How to change -0.3125 to -20 64

pytho

21st Sep 2017, 1:57 PM
anwar tan
anwar tan - avatar
2 Antworten
+ 2
x = -0.3125 x = -2064 I am not sure it is what you wanted
21st Sep 2017, 4:07 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 2
from fractions import * f=Fraction(-0.3125) print(4*f.numerator,4*f.denominator)
21st Sep 2017, 4:09 PM
yuri