❮ math
❯
math examples
examples/math/examples.py
import math print(math.pi) # 3.141592653589793 print(math.e) # 2.718281828459045 print(math.sin(23)) # -0.8462204041751706 print(math.perm(3)) # 6 permutations print(math.perm(4)) # 24 permutations print(math.perm(4, 2)) # 12 permutations print(math.lcm(120, 42)) # 840 least common multiple print(math.gcd(120, 42)) # 6 greatest common divisor