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