English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Explain the following built-in function. round() - Computer Science

Advertisements
Advertisements

Question

Explain the following built-in function.

round()

Answer in Brief

Solution

Function Description Syntax Example
round() Returns the nearest integer to its input.
1. The first argument (number) is used to specify the value to be rounded.
round (number [,ndigits])
X = 17.9 
y = 22.2 
Z = -18.3 
print ('x value is rounded to', round (x)) 
print ('y value is rounded to', round (y)) 
print ('Z value is rounded to', round (z))
shaalaa.com
Introduction to Python Functions
  Is there an error in this question or solution?
Chapter 7: Python functions - Evaluation [Page 113]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 7 Python functions
Evaluation | Q 3. (c) | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×