New course! Every coder should learn Generative AI!
Try a free lesson0
How to change float back to integer?
3 Answers
+ 4
a = 6.9
print (int(a))
+ 3
depends on how you want it
if you want 2.9 to be 2, then int (x)
if you want it to be 3, then Math.round (x)
0
cual es mejor python 2.7o 3.0