Articles → Python → Round Function In Python

Round Function In Python






Purpose





Syntax


round(number, n)




  1. Number → Number you want to round off
  2. N → Number of digits after decimal

Example


import math
print(round(math.pi,3))



Output


Picture showing the output of the Round function in python



Posted By  -  Karan Gupta
 
Posted On  -  Monday, April 22, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250