+ 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 Answers
+ 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
тŠ°Ń€Š°Ń