Sail E0 Webinar
Question
What is the result of round(0.5) “ round(-0.5)?
Options:
A .  1.0
B .  2.0
C .  0.0
D .  None of the mentioned
Answer: Option B


Python rounds off numbers away from 0 when the number to be rounded off is exactly halfway through. round(0.5) is 1 and round (-0.5) is -1.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers