How to round off numbers in python?

Python provide us with an inbuilt round() function to round off the numbers.
round() function makes it very easy to round off any number.
e.g.,
a=23.34 print(round(a))

We can round off a number up to any number of decimal places.
e.g.,
a=1/3 print(round(a, 2))

This is all about rounding off a number.
Subscribe
Login
Please login to comment
0 Discussion