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

question 5 14h30

parent 1f312b6a
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,19 @@ class TabletteChocolat:
for j in range(1,self.n):
g.append((0,j))
return g
def est_possible(self,i,j):
g=TabletteChocolat.coups_possibles(self)
if (i,j) in g:
return ("ce coup est possible")
else:
return("ce coup est impossible")
T1=TabletteChocolat(3,4)
T2=TabletteChocolat(1.5,7)
g = T1.coups_possibles()
print(T1.est_possible(2,0))
print(T1.est_possible(3,0))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment