diff --git a/main.py b/main.py index da21ea3e60d2216cb5442a8cd9409d6cbc5fb2ba..ba7f1ac2cea0ed8cdbf60e57c72e57aba06f31ec 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,13 @@ class TabletteChocolat: def __init__(self,m,n): self.m=m self.n=n + def __str__(self): + return str(self.m*self.n) + def __repr__(self): + return ("Tablette de chocolat de" str(self)) +t=TabletteChocolat(3,4) +print(t) except: raise TypeError(int(self.m),int(self.n))