math module
Në shqip: Moduli math
ShpjegimiSQ
Moduli math ka funksione dhe konstante matematikore: math.sqrt(), math.pi, math.floor(), math.ceil(), math.gcd(), math.factorial(). Për llogaritje me vargje të mëdha numrash, përdor NumPy.
EnglishEN
The math module has mathematical functions and constants: math.sqrt(), math.pi, math.floor(), math.ceil(), math.gcd(), math.factorial(). For calculations on big arrays of numbers, use NumPy.
Si ta mendosh
Si kalkulatori shkencor në çantë.
Lexoje në anglisht
Like the scientific calculator in your bag.
Shembull kodipython
import math
print(math.sqrt(16), math.pi)
print(math.ceil(4.1), math.floor(4.9)) # 5 4