Skip to content
Snippets Groups Projects
Commit e6c30e4a authored by VALLET Armel's avatar VALLET Armel
Browse files

question 3

parent 21a6d0c9
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,14 @@ class TabletteChocolat:
self.m = m
self.n = n
def __str__(self):
return "Tablette de chocolat de " + str(self.m) + "x" + str(self.n)
def __repr__(self):
return str(self)
# Programme principal
t = TabletteChocolat("a", "b")
t = TabletteChocolat(1, 2)
print(t)
TabletteChocolat(3, 4)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment