Skip to content
Snippets Groups Projects
Commit ddb105a1 authored by COULIBALY Gie drissa's avatar COULIBALY Gie drissa
Browse files

Update file main.py

parent f48fb9fa
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,13 @@ class TabletteChocolat: ...@@ -2,7 +2,13 @@ class TabletteChocolat:
def __init__(self,m,n): def __init__(self,m,n):
self.m=m self.m=m
self.n=n 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: except:
raise TypeError(int(self.m),int(self.n)) raise TypeError(int(self.m),int(self.n))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment