Skip to content
Snippets Groups Projects
Commit 937d6253 authored by BAHOU Mehdi's avatar BAHOU Mehdi
Browse files

Question 3

parent 98a9f825
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,20 @@ class TabletteChocolat:
raise TypeError
self.m = m
self.n = n
def __str__(self):
"""
Doc de String
:return: Tablette de chocolat de mxn
"""
return 'Tablette de chocolat de ' + str(self.m) + 'x' + str(self.n)
def __repr__(self):
"""
Doc de __repr__
:return: Tablette de chocolat de mxn
"""
print('Tablette de chocolat de ' + str(self.m) + 'x' + str(self.n))
#Programme Principal
Tablette = TabletteChocolat(3,4)
print(Tablette)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment