Vidyalelo
Python · Q15

MCQs for Python Data Types and Numeric Types Chapter

Programming · Python · question 15

Q15

What is the purpose of the round() function in Python?

A.
To round up a number
B.
To round down a number
C.
To round a number to the nearest integer
D.
To round a number to a specified number of decimal places
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
The round() function rounds a number to a specified number of decimal places.