diff --git a/examen.py b/examen.py index 02e9f61e139cc3e0a7f8d1283472695d72aad815..ad47d29427ef09712ce2f78ae115f385cc7af5c2 100644 --- a/examen.py +++ b/examen.py @@ -77,18 +77,17 @@ class TabletteChocolat: if demande == 'l': while(True): reponse = int(input("Combien ? En sachant qu'il y a " + str(self.m-1) +" possibilités")) - if 1 <= reponse < self.m -1: + if 1 <= reponse < self.m: return (reponse,0) else: print('coup non valide') elif demande == 'c': while(True): reponse = int(input("Combien ? En sachant qu'il y a "+ str(self.n - 1)+ " possibilités")) - if 1 <= reponse < self.m -1: + if 1 <= reponse < self.n: return (0,reponse) else: print('coup non valide') - #Programme Principal Tablette = TabletteChocolat(4,3) @@ -97,5 +96,3 @@ g= Tablette.coups_possibles() print(list(g)) print(Tablette.est_possible(1,0)) biscuit = Tablette.coupe(1,0) -Tablette.plot() -print(Tablette.demander_coup()) \ No newline at end of file