[Tutor] mathematical and statistical functions in Python
Martin A. Brown
martin at linux-ip.net
Sun Sep 27 20:48:28 CEST 2015
Greetings Michel,
> Thanks for your e-mail. I did not receive e-mail from Mr
> Otten.
Nobody in their right mind wants to receive an email from Mr. Otten. ;)
> Basically, the problem that I am facing is that python 3.4 does
> not recognise the mathematical and statistical functions.
https://docs.python.org/3/library/math.html#module-math
> For example, I am trying to find the square root, sqrt(25) but the
> program does not recognise the definition of sqrt(). The same
> problem i am facing with the mean, the variance and the standard
> deviation.
In your code, include:
import math
eleven = math.sqrt(121)
> This is the main problem. Once I solve it, I can input the
> parameters of the mathematical financial model.
You also said statistics. If you are looking for the basic tools,
then you can find them here:
https://docs.python.org/3/library/statistics.html#module-statistics
Thggere are other, richer tools in third-party libraries if you are
looking for more advanced tools. But, perhaps you only need to
start with the above.
Good luck,
-Martin
--
Martin A. Brown
http://linux-ip.net/
More information about the Tutor
mailing list