?
What will be the output of the following Python expression?
What will be the output of the following Python expression?
round(4.5676,2)?
round(4.5676,2)?
Answer & Solution
Correct Answer:
Option
C
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.
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.
Join the Discussion
Login to post a comment or share your explanation.
Login