Q17
What will be the output of the following Python expression? round(4.5676,2)?
A.
4.5
B.
4.6
C.
4.57
AnswerD.
4.56
Answer: Option C
Solution
Answer: Option C
Solution:
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.