+ 1

Getting a nearest whole no. in python

if input is a no. how can I get an output of its nearest whole no.

18th Dec 2019, 3:20 PM
Rishav Kumar
Rishav Kumar - avatar
1 Answer
+ 2
With the function round. You just have to convert the input to a float, then round it.
18th Dec 2019, 3:57 PM
HonFu
HonFu - avatar