0

How to change float back to integer?

21st Jul 2016, 12:21 AM
Rizki Leonardo
Rizki Leonardo - avatar
3 Respostas
+ 4
a = 6.9 print (int(a))
21st Jul 2016, 12:58 PM
marcos martins
+ 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)
22nd Jul 2016, 3:08 PM
Dr.Na'el Hariri
Dr.Na'el Hariri - avatar
0
cual es mejor python 2.7o 3.0
22nd Jul 2016, 12:29 AM
Ender Hernandez
Ender Hernandez - avatar