diff --git a/main.py b/main.py index a56ab5557962858883da590ef2c146b6f0986fa0..c2a9f92bcbc20c266087aa7691c43258e98c418c 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))