Skip to main content
Sign in
Snippets Groups Projects
Commit 35364ccf authored by KONATE Oumonmian ibrahim's avatar KONATE Oumonmian ibrahim
Browse files

Add file test.py

parent 5133b327
No related branches found
No related tags found
No related merge requests found
# question 1)
import itertools as iter
class TabletteChocolat:
def __init__(self,m,n):
self.m=m
self.n=n
try:
m=int(m)
n=int(n)
except ValueError:
print("Les entrées doivent être des entiers")
def __str__(self):
return "Tablette Chocolat de "+ str(self.m)+"X"+str(self.n)
def __repr__(self):
return str(self)
def coups_possible(self):
for i,j in range(self.m, self.n):
t=TabletteChocolat(3, 4)
t=TabletteChocolat(4, 4)
print(t)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment