Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

Python - Math Library

Back


Built-in Functions

print("\n--------Built-in Math Functions--------\n")

print("min([5, 10, 25]):\t", min([5, 10, 25]))      # min([5, 10, 25]):        5
print("max([5, 10, 25]):\t", max([5, 10, 25]))      # max([5, 10, 25]):        25
# abs(): returns the absolute (positive) value
print("abs(-7.25):\t\t", abs(-7.25))                # abs(-7.25):              7.25

# returns the value of x to the power of y
print("pow(4, 3):\t\t", pow(4, 3))                  # pow(4, 3):               64

Math


Top