From 2edd71d85001aaaac61123ef42aa31f2597f5f31 Mon Sep 17 00:00:00 2001 From: COULIBALY Gie drissa <gie-drissa.coulibaly@etu.univ-amu.fr> Date: Fri, 10 Jan 2025 13:48:38 +0000 Subject: [PATCH] Update file main.py --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index a56ab55..c2a9f92 100644 --- a/main.py +++ b/main.py @@ -6,12 +6,19 @@ class TabletteChocolat: return str(self.m*self.n) def __repr__(self): return ("Tablette de chocolat de" str(self)) + def __coups_possibles__(self): + for p in range(m) + return i in tuple(p,0) + or + return i in tuple(0,p) except: raise TypeError(int(self.m),int(self.n)) t=TabletteChocolat(3,4) +g=t.coups_possibles() print(t) +print(list(g)) -- GitLab