New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How to change -0.3125 to -20 64
pytho
2 Answers
+ 2
x = -0.3125
x = -2064
I am not sure it is what you wanted
+ 2
from fractions import *
f=Fraction(-0.3125)
print(4*f.numerator,4*f.denominator)