Path: blob/master/Python for Data Science/Day 1 Mathematical Analysis in Python.ipynb
3074 views
Kernel: Python 3 (ipykernel)
Math methods
In [1]:
Out[1]:
Enter any number =23
4.796
In [2]:
Out[2]:
9.0
In [10]:
Out[10]:
10.0
In [11]:
Out[11]:
40320
In [12]:
Out[12]:
3.3219280948873626
In [13]:
Out[13]:
2980.9579870417283
In [1]:
Out[1]:
234000.665
In [2]:
Out[2]:
-14
20
In [3]:
Out[3]:
89.9922
In [4]:
Out[4]:
1152921504606846976
The math.ceil() method rounds a number upwards to its nearest integer, and the math.floor() method rounds a number downwards to its nearest integer, and returns the result
In [5]:
Out[5]:
5
4
In [6]:
Out[6]:
3.141592653589793
In [ ]: