diff --git a/main.py b/main.py new file mode 100644 index 0000000000000000000000000000000000000000..52a2a433682f8038a3289a95a0c3c44d26e9e659 --- /dev/null +++ b/main.py @@ -0,0 +1,54 @@ +class TabletteChocolat: + def __init__(self, m,n): + self.m = m: + self.n = n: + + if type(n)==and type(n)==int ; + self.lignes =n + self. colonne = m + else : False= typeEroordef + def_str_(self) + return ("Tablette de chocolat de "+str(self.lignes) + "x" + str(self.colonnes") + def _repr_(self): + return (("Tablette de chocolat de "+str(self.lignes) + "x" + str(self.colonnes")) + def corps_possible(self) + return ((itertools.clain(i,0) for i in range(0,self.ligne)). (0,j) for j in range(0,self.colonnes)) + + def coups (self, i,n) + i= [] + for i in range(self.lignes -i, self.colonnes -j) + + + def plot (self) : + i=[] + for i in range(self) + plt.show + plt.gca() set.aspect('equal') + pit.axis ('off') + + def demander_coup(self) : + a= input(str)("voulew vous couper des lignes (l) ou des colonnes c ") + if a== "l" + g=self.coups_passibles() + print(list (g)) + g=input ("combien de lignes voulez vous coupoer") + if int(b),0) est possible : + return (int(b), 0) + else : self(demain_coups) + return a==c + def plot (self) + + + + + + + + + + + + + + + \ No newline at end of file