Examveda

What will be the output of the following Python expression?
round(4.576)

A. 4.5

B. 5

C. 4

D. 4.6

Answer: Option B

Solution (By Examveda Team)

The correct answer is Option B: 5.
The round() function in Python is used to round a floating-point number to the nearest integer.
When you pass 4.576 to the round() function, it rounds it to the nearest integer, which is 5.

This Question Belongs to Python Program >> Python Built In Functions

Join The Discussion

Related Questions on Python Built In Functions