diff --git a/examen.py b/examen.py index 52766ce6e315c2871728b0bddadc217f45e19e7b..928408afe65333dd8aadd77e397c104df74555cc 100644 --- a/examen.py +++ b/examen.py @@ -8,6 +8,8 @@ class TabletteChocolat: n : nombres de colonnes int """ def __init__(self, m, n): + if type(m) != int or type(n) != int: + raise TypeError self.m = m self.n = n