+ 2

Round a number with negative number of digits

Hello, Can you please help me to understand the result of round builtin function when a negative number of digits passed to it? Examples: >>> round(10.0055,-2) 0.0 >>> round(1000.0055,-2) 1000.0 >>> round(1000.0055,-3) 1000.0 Thank you!

5th Jun 2019, 7:17 AM
N. A.
N. A. - avatar
1 ответ
+ 4
Thank you so much. I tried it: https://code.sololearn.com/c56P6s6PW0JO Now i understand it :) thanks for your help :)
5th Jun 2019, 7:36 AM
N. A.
N. A. - avatar