+ 3

How I can change a float number to an integer number

How I can change a float number to an integer number in Python I try int(66.66) but the result was 66 I wanna make it 67 and if the number is 66.3 i wanna the result 66 Thank u

1st Nov 2020, 8:46 AM
Toufik Salhi
Toufik Salhi - avatar
2 Respostas
+ 6
Easy, use the round() function round(6.9) will return 7 round(6.3) will return 6 you should try googling for such questions. Happy coding :)
1st Nov 2020, 8:56 AM
Hosea
0
а можна по українській
1st Nov 2020, 12:32 PM
тарас