| Deutsch English Français Italiano |
|
<626a56c9$0$24796$426a74cc@news.free.fr> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp5-1.free.fr!not-for-mail
Date: Thu, 28 Apr 2022 10:56:41 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.1
Subject: Re: Statistiques de base : Moyenne
Content-Language: fr
Newsgroups: fr.comp.lang.python
References: <AP2dnc1uBZlV1Pf_nZ2dnUU7_8zNnZ2d@giganews.com>
From: Nicolas <nicolasp@aaton.com>
In-Reply-To: <AP2dnc1uBZlV1Pf_nZ2dnUU7_8zNnZ2d@giganews.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 27
Message-ID: <626a56c9$0$24796$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 28 Apr 2022 10:56:41 CEST
NNTP-Posting-Host: 195.101.33.1
X-Trace: 1651136201 news-2.free.fr 24796 195.101.33.1:11972
X-Complaints-To: abuse@proxad.net
Bytes: 1444
Bonjour,
Le 28/04/2022 à 10:01, Mestemaiun a écrit :
> def mean(nums):
> nums = [1, 6, 6, 7, 8, 8, 9, 10, 10]
> a = sum(nums)
> b = a/len(nums)
> x = round(b , 1)
> print(x)
A quoi sert la fonction "mean" ?
Je pense que ce vous voulez écrire est :
nums = [1, 6, 6, 7, 8, 8, 9, 10, 10]
def mean(nums):
a = sum(nums)
b = a/len(nums)
x = round(b , 1)
return x
m = mean(nums)
print(m)
Nicolas