0% found this document useful (0 votes)
4 views1 page

Python Math Functions and Operations

The document contains a Python script that performs various mathematical operations using the math module. It prompts the user to input two float values, x and y, and then calculates and prints the results of functions such as ceiling, floor, absolute value, remainder, GCD, LCM, exponentiation, logarithms, trigonometric functions, and hyperbolic functions. Some operations are conditional based on the values of x and y, providing 'undefined' for invalid inputs.

Uploaded by

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

Python Math Functions and Operations

The document contains a Python script that performs various mathematical operations using the math module. It prompts the user to input two float values, x and y, and then calculates and prints the results of functions such as ceiling, floor, absolute value, remainder, GCD, LCM, exponentiation, logarithms, trigonometric functions, and hyperbolic functions. Some operations are conditional based on the values of x and y, providing 'undefined' for invalid inputs.

Uploaded by

CHRISTIAN ALVAR
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import math

x= float(input("Enter value of x: "))


y= float(input("Enter value of y: "))

print([Link](x))
print([Link](x))
print([Link](x))
print([Link](x, y))
print([Link](int(x), int(y)))
print([Link](int(x), int(y)))
print([Link](x))
print([Link](x)if x > 0 else "undefined")
print(math.log2(x)if x > 0 else "undefined")
print(math.log10(x)if x > 0 else "undefined")
print([Link](x, y))
print([Link](x)if x >= 0 else "undefined")
print([Link](x))
print([Link](x))
print([Link](x))
print([Link](x)if -1 <= x <= 1 else "undefined")
print([Link](x)if -1 <= x <= 1 else "undefined")
print([Link](x))
print([Link](x, y))
print([Link](x))
print([Link](x))
print([Link](x))
print([Link](x))
print([Link](x)if x >= 1 else "undefined")
print([Link](x)if -1 < x < 1 else "undefined")
print([Link](x))
print([Link](x))
print([Link](x))

You might also like