Skip to content
Snippets Groups Projects
Commit 9761eb71 authored by rachida0001's avatar rachida0001
Browse files

question 7

parent 416bc2e7
No related branches found
No related tags found
No related merge requests found
class TabletteChocolat:
def __init__(self, m, n):
"""
constructeur
Raises:
TypeError: si m n'est pas entier
TypeError: si n n'est pas entier
"""
if (type(m)!=int):
raise TypeError("m n'est pas entier")
elif(type(n)!=int):
......@@ -30,7 +39,12 @@ class TabletteChocolat:
return TabletteChocolat(self.m -i, self.n -j)
def plot(self):
pass
x = []
y = []
plt.fill(x,y)
plt.gca().set_aspect('equal')
plt.axis('off')
plt.show()
def demander_coup(self):
rep = input("coup des lignes (l) ou colonnes (c)")
......@@ -74,5 +88,3 @@ if __name__ == "__main__":
import doctest
doctest.testmod()
jouer(3,4)
\ No newline at end of file
[(1,i) for i in range(7)]
\ 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