Skip to content
Snippets Groups Projects
Commit b366cd81 authored by Leo Litaize's avatar Leo Litaize
Browse files

Question 1

parent 06267034
No related branches found
No related tags found
No related merge requests found
...@@ -7,5 +7,12 @@ class TabletteChocolat: ...@@ -7,5 +7,12 @@ class TabletteChocolat:
except : except :
raise TypeError("Rentrer des entiers") raise TypeError("Rentrer des entiers")
a=TabletteChocolat(5.5,1) def __str__(self):
print(a) return "("+str(self.m) + "x" + str(self.n) + ")"
def __repr__(self):
return str(self)
t=TabletteChocolat(3,4)
print(t)
TabletteChocolat(4,3)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment