+ 1
How to drowing math function in python ?
drowing sin(x)... cos(x)...x^2
2 ответов
+ 10
from math import pow # import x^y
print(pow (2,3)) # 2^3 = 8
# or:
from math import * # import all functions
print(pow(64,1/3)) # root 3 step of 64
print(cos(0))
print(sin(0))
# or:
import math
print(math.cos(0))
print(math.sin(0))
p.s. sorry. You asked about drowing...
+ 3
you can do it (plot) with matplotlib and numpy