[Tutor] mathematical and statistical functions in Python
Laura Creighton
lac at openend.se
Sun Sep 27 23:46:27 CEST 2015
In a message of Sun, 27 Sep 2015 11:48:28 -0700, "Martin A. Brown" writes:
>
>
>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
The tutor list is sending mail out late.
Michel had 2 problems. The first is that he hadn't subscribed to
python list, which meant that he wasn't getting the replies that
weren't explicitly emailed to him.
The second problem was that he didn't know he needed to
import math and statistics.
I think things are working ok now, and he knows about the tutor list,
too. :) great, welcome.
Laura
More information about the Tutor
mailing list