 Python provides a round function for rounding a float to the nearest integer . For tie @-@ breaking , versions before 3 use round @-@ away @-@ from @-@ zero : round ( 0 @.@ 5 ) is 1 @.@ 0 , round ( -0.5 ) is − 1 @.@ 0 . Python 3 uses round to even : round ( 1 @.@ 5 ) is 2 , round ( 2 @.@ 5 ) is 2 . 
