-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath-function.py
More file actions
31 lines (18 loc) · 813 Bytes
/
math-function.py
File metadata and controls
31 lines (18 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#############################################
# #
# #
# MATH FUNCTION #
# #
#############################################
import math # importing math
print(math.sqrt(6)) # printing square value
print(math.ceil(56.23424)) # printing round off value , it will show greatest number
print(math.floor(56.34223)) # printing , it will shows whole number as 56
print(math.factorial(6)) # printing factorial 6*5*4*3*2*1
print(math.fabs(5)) # it will show 5.0
print(math.fabs(-5)) # it will show also 5.0
# fabs = absolute number even it is negative or positive
print(math.pow(2,3)) # printing power 2 * 3 = 2 * 2 * 2 = 8.0
print(math.log2(2)) # it will give 1.0
print(math.pi) # it will show pi value
########################################################