Skip to content

Latest commit

 

History

History
executable file
·
31 lines (15 loc) · 668 Bytes

File metadata and controls

executable file
·
31 lines (15 loc) · 668 Bytes

math

What it is good for?

math contains mathematical functions similar to a scientific calculator.

In the module, you find various trigonometric and exponential functions. In addition the two constants pi and e are included.

Installed with Python by default

yes

Example

Calculating a square root, a sine, an exponential function and a logarithm.

import math

print(math.sqrt(49))

print(math.sin(math.pi / 2))

print(math.exp(1.0) == math.e)

print(math.log(256,2))

Where to learn more?

https://docs.python.org/3/library/math.html