From 82db08f4d24300b150bab7a8c3ac2277abb49c37 Mon Sep 17 00:00:00 2001 From: "arthur.laine" Date: Fri, 7 Feb 2025 13:25:44 +0100 Subject: [PATCH 1/3] =?UTF-8?q?une=20nouvelle=20fonction=20oubli=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rebondsPasse.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 rebondsPasse.py diff --git a/rebondsPasse.py b/rebondsPasse.py new file mode 100644 index 0000000..c83c9f4 --- /dev/null +++ b/rebondsPasse.py @@ -0,0 +1,3 @@ +from traitement import traitement +def rebondPasses(joueur): + tb1 = traitement ("stats") \ No newline at end of file From 4a54ee1b6adee136880e3801b29b741bb5b67cd1 Mon Sep 17 00:00:00 2001 From: "arthur.laine" Date: Fri, 7 Feb 2025 13:39:06 +0100 Subject: [PATCH 2/3] la premiere fonction d'arthur --- rebondsPasse.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rebondsPasse.py b/rebondsPasse.py index c83c9f4..03c8c2a 100644 --- a/rebondsPasse.py +++ b/rebondsPasse.py @@ -1,3 +1,19 @@ from traitement import traitement def rebondPasses(joueur): - tb1 = traitement ("stats") \ No newline at end of file + tb1 = traitement ("stats") + lst_joueur = tb1[0] + lst_action = tb1[1] + passe = 0 + rebondOff = 0 + rebondDef = 0 + for i in range(len(lst_joueur)): + if str(joueur) == str(lst_joueur[i]): + action = lst_action[i] + if action == "passe": + passe = passe +1 + if action == "rebondOff": + rebondOff = rebondOff + 1 + if action == "rebondDef": + rebondDef = rebondDef +1 + return("Passe:",passe,"RebondOff:",rebondOff,"rebondDef:",rebondDef) + \ No newline at end of file From d71f53835518be3cb742c2f8ee14c41162f3619e Mon Sep 17 00:00:00 2001 From: "arthur.laine" Date: Fri, 7 Feb 2025 13:49:25 +0100 Subject: [PATCH 3/3] une deuxieme fonction arthur --- manque.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/manque.py b/manque.py index 5393282..10711df 100644 --- a/manque.py +++ b/manque.py @@ -1,3 +1,21 @@ from traitement import traitement def manque(joueur): - tb1 = traitement("stats.txt") \ No newline at end of file + tb1 = traitement("stats.txt") + lst_joueur = tb1[0] + lst_action = tb1[1] + perte_de_balle = 0 + tir_manque = 0 + lancer_rat = 0 + total_manque = 0 + for i in range(len(lst_joueur)): + if str(joueur) == str(lst_joueur[i]): + action = lst_action[i] + if action == "tir-manque": + tir_manque = tir_manque +1 + if action == "lancer-rat": + lancer_rat = lancer_rat + 1 + if action == "perteBalle": + perte_de_balle = perte_de_balle +1 + total_manque = tir_manque + lancer_rat + perte_de_balle + print(total_manque) +