DevJourney

Python/VIT/sem-1/ex-05/math-module-experiments.py

import math

ceil = math.ceil(1.4)
floor = math.floor(1.4)
fact = math.factorial(5)
gcd = math.gcd(3, 6)
pwr = math.pow(2, 3)
pi = math.pi

print(f"Ceil of 1.4: {ceil}")
print(f"Floor of 1.4: {floor}")
print(f"Factorial of 5: {fact}")
print(f"GCD of 3 and 6: {gcd}")
print(f"2 raised to the power of 3: {pwr}")
print(f"Value of Pi: {pi}")
View on GitHub