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

questions 6 et 7 15h03

parent fc3a5a8b
No related branches found
No related tags found
No related merge requests found
from itertools import chain
import matplotlib.pyplot as plt
class TabletteChocolat:
def __init__(self, m, n):
......@@ -24,6 +25,20 @@ class TabletteChocolat:
return ("ce coup est possible")
else:
return("ce coup est impossible")
# def coupe(self,i,j):
# g=TabletteChocolat.coups_possibles(self)
# for k in range(1,self.m):
# m1=max(g[k](0))
def plot(self):
plt.plot(self.n,self.m)
for k in range(self.m*self.n):
plt.fill((0,0),(self.n,self.m))
plt.gca().set_aspect('equal')
plt.axis('off')
plt.show()
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment