Python: Importando Funções Matemáticas: Difference between revisions
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) | ||
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)