Skip to content
Snippets Groups Projects
Commit 0db86b35 authored by BAHOU Mehdi's avatar BAHOU Mehdi
Browse files

Question 9 pas bon faut voir l'autre

parent 59878469
No related branches found
No related tags found
No related merge requests found
......@@ -75,11 +75,19 @@ class TabletteChocolat:
def demander_coup(self):
demande = input('Couper des lignes (l) ou colonnes (c) ?')
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:
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:
return (0,reponse)
else:
print('coup non valide')
#Programme Principal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment