0% found this document useful (0 votes)
3 views2 pages

Math Function

The document outlines a Python programming assignment focused on mathematical functions. It includes code snippets demonstrating the use of various math functions such as min, max, abs, power, sqrt, ceil, floor, fabs, exp, log, log10, round, and modf. The assignment is submitted by a student named Shreya Balaji Jadhav from the Department of Computer Engineering at Gramin Technical and Management Campus Nanded.

Uploaded by

ranjereanamika3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Math Function

The document outlines a Python programming assignment focused on mathematical functions. It includes code snippets demonstrating the use of various math functions such as min, max, abs, power, sqrt, ceil, floor, fabs, exp, log, log10, round, and modf. The assignment is submitted by a student named Shreya Balaji Jadhav from the Department of Computer Engineering at Gramin Technical and Management Campus Nanded.

Uploaded by

ranjereanamika3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Gramin Technical And Management Campus Nanded

Department of computer Engineering (Degree)

Subject Name/code :-BTCOL406 / Python Programming

Student Name :-Shreya Balaji Jadhav PRN No :-23025081245085

DOP:- DOC:-

Aim :- Math Function

Coding :-

import math
#min,max function
x = min(4, 20, 35)
y = max(5, 10, 25)
print(x)
print(y)
#abs function
x = abs(-7.65)
print(x)
#power function
x = pow(3, 6)
print(x)
#sqrt function
x = math.sqrt(25)
print(x)
#ceil function
x = math.ceil(1.6)
y = math.floor(1.6)
print(x)
print(y)
#floor function
BTCOL406 :-Python Programming

q = 9.99
print(math.floor(q))
#fabs function
print(math.fabs(-25))
#exp function
math.pow(math.e, x)
print(math.exp(3))
print(math.pow(math.e, 3))
#log function
print(math.log(20))
print(math.log(20, 3))
#log10 function
print(math.log10(1000))
#round function
x = round(5.76543, 2)
print(x)
#modf function
print ("math.modf(50.12) : ", math.modf(50.12))

Output :-

You might also like