Python: Importando Funções Matemáticas: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 12: | Line 12: | ||
#!/usr/bin/python | #!/usr/bin/python | ||
from math import sqrt,pow | from math import sqrt,pow | ||
print "math.sqrt(100) : ", sqrt(100) | print "math.sqrt(100) : ", sqrt(100) | ||
Line 19: | Line 19: | ||
==== Verificando o help ==== | ==== Verificando o help ==== | ||
import math | >>> import math | ||
help(math) | >>> help(math) | ||
= Ver também = | = Ver também = |
Latest revision as of 01:27, 28 September 2018
Importando a lib
import math
Importando com um alias
import math as m
Importando apenas algumas funções
#!/usr/bin/python from math import sqrt,pow print "math.sqrt(100) : ", sqrt(100)
Resultado: math.sqrt(100) : 10
Verificando o help
>>> import math >>> help(math)