Examveda

What will be the output of the following Python expression?
round(4.5676,2)?

A. 4.5

B. 4.6

C. 4.57

D. 4.56

Answer: Option C

Solution (By Examveda Team)

The correct answer is Option C: 4.57.
The round() function in Python is used to round a floating-point number to a specified number of decimal places.
When you call round(4.5676, 2), it rounds the number 4.5676 to 2 decimal places, resulting in 4.57.

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

Join The Discussion

Related Questions on Python Built In Functions