Articles → Python → Mathematical functions in python

Mathematical functions in python

Mathematical functions


import math

print ("Absolute value of  -25 is ", abs(-25))
print ("Round up of value  2.35 is  ", math.ceil(2.35))
print ("Round up of value  -2.35 is  ", math.ceil(-2.35))
print ("Round down of value  2.35 is  ", math.floor(2.35))
print ("Round down of value  -2.35 is  ", math.floor(-2.35))
print ("3 raise to the power 4 is   ", pow(3,4))

Picture showing the output of abs, math.ceil, math.floor and pow function in python

Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Tuesday, February 19, 2019


Your Email Id  
Query/FeedbackCharacters remaining 250