Skip to content
Snippets Groups Projects
Commit ade097ce authored by VILLA Jonathan's avatar VILLA Jonathan
Browse files

13h51

parent 61755460
No related branches found
No related tags found
No related merge requests found
...@@ -2,9 +2,14 @@ class TabletteChocolat: ...@@ -2,9 +2,14 @@ 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 typage(self,m,n):
try: try:
self.m=int(self.m) assert (self.m==int(self.m) and self.n==int(self.n))
self.n=int(self.n)
except: except:
print("Erreur m et n ne sont pas des entiers") return(ValueError)
T1=TabletteChocolat(1,2)
T2=TabletteChocolat(1.5,7)
T=T1.typage
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment