From a2e51ea5f46376eabd02d6b919107a6b53eb14c3 Mon Sep 17 00:00:00 2001 From: thomas neveu Date: Tue, 26 May 2026 10:59:03 +0200 Subject: [PATCH] =?UTF-8?q?fonction=20puissance=20moyenne=20commenc=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projet_conso.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/projet_conso.py b/projet_conso.py index 7317c2b..80088e1 100644 --- a/projet_conso.py +++ b/projet_conso.py @@ -96,4 +96,14 @@ def kPlusProches(point, tableau): d = distance(point, voisin) liste_distances.append((d, i)) liste_distances.sort() - return liste_distances \ No newline at end of file + return liste_distances + +def puissancemoyenne (liste_distances, tableau) : + """ calcule et renvoie la puissance éléctrique moyenne des voisins """ + moy = (liste_distances + tableau) / 2 + return moy + + + +def lancerTest +