Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #97119 > unrolled thread
| Started by | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| First post | 2015-09-25 00:12 -0700 |
| Last post | 2015-09-25 00:12 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Problem to calculate the mean in version 3.4 Paul Rubin <no.email@nospam.invalid> - 2015-09-25 00:12 -0700
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2015-09-25 00:12 -0700 |
| Subject | Re: Problem to calculate the mean in version 3.4 |
| Message-ID | <87eghnas6y.fsf@jester.gateway.sonic.net> |
Michel Guirguis <guirguismichel@yahoo.co.uk> writes:
>>>> mean([1, 2, 3, 4, 4])
> Traceback (most recent call last):...
> NameError: name 'mean' is not defined
Before you can use that function, you have to import the statistics
module, e.g.:
>>> import statistics
>>> statistics.mean([1,2,3,4,4])
or
>>> from statistics import mean
>>> mean([1,2,3,4,4])
Back to top | Article view | comp.lang.python
csiph-web