diff --git a/test.py b/test.py index 29ed6aad02bcb3fd3868b2706730e30c17f6e335..9342eeab0b13f027d9f902120c6013a1ba2ce4f1 100644 --- a/test.py +++ b/test.py @@ -1,5 +1,26 @@ +# question 1) +import itertools as iter class TabletteChocolat: def __init__(self,m,n): self.m=m self.n=n - \ No newline at end of file + try: + m=int(m) + n=int(n) + except ValueError: + print("Les entrées doivent être des entiers") + + + def __str__(self): + return "Tablette Chocolat de "+ str(self.m)+"X"+str(self.n) + def __repr__(self): + return str(self) + def coups_possible(self): + for i,j in range(self.m, self.n): + + + +t=TabletteChocolat(3, 4) +t=TabletteChocolat(4, 4) + +print(t) \ No newline at end of file