Python round() FunctionPython round() function rounds off the digits of a number and returns the floating-point number. SignatureParametersnumber : The number that is to be rounded. digits : It is the number for which the given number is to be rounded, and it is an optional parameter. ReturnIt rounds-off a number and returns the value as output. Let's see some examples of round() function which are given below: Python round() Function Example 1This example shows working of the round() function in Python: Output: 10 11 7 Python round() Function Example 2This example shows round-off a number to given n digits places: Output: 2.67 2.67 Next TopicPython Built in Functions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India