Apr-30-2018, 12:30 PM
Hi there,
I am a new python user and I am learning python in my uni. I got stuck with my homework. I have to import a math module into python. This is my task:
Use the math module to calculate e to the power of 3. print the answer.
This is my code:
import math.exp(x)
x= 3
print(math.exp(x))
But this doesn't work....
I don't understand, how can I import the math.exp module from here: https://docs.python.org/3/library/math.html
any ideas?
Thanks!
Jack
I am a new python user and I am learning python in my uni. I got stuck with my homework. I have to import a math module into python. This is my task:
Use the math module to calculate e to the power of 3. print the answer.
This is my code:
import math.exp(x)
x= 3
print(math.exp(x))
But this doesn't work....
I don't understand, how can I import the math.exp module from here: https://docs.python.org/3/library/math.html
any ideas?
Thanks!
Jack