diff --git a/exam.py b/exam.py index d81f1813894ee91aee20616b8f4970ee824f9f77..daa6c4f159c3a4339564afb9867b33eab7a14fe1 100644 --- a/exam.py +++ b/exam.py @@ -35,7 +35,16 @@ class TabletteChocolat: plt.axis('off') plt.show() plt.close() - + def demender_coup(self): + n=0 + x = input("couper des lignes (l) ou des colones (c)") + if x=="c": + while not self.est_possible(0, int(n)): + n = input("combien de colonnes a couper" + str(list(range(1, self.n)))) + return self.coup(int(n),0) + else: + raise ValueError("il faut repondre l ou c") +