Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ExamInfo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AZOUAOUI Fares
ExamInfo
Commits
c7ac3de2
Commit
c7ac3de2
authored
5 months ago
by
Fares_AZOUAOUI
Browse files
Options
Downloads
Patches
Plain Diff
petite correction de la méthode coups_possibles
parent
e230a76e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+7
-4
7 additions, 4 deletions
main.py
with
7 additions
and
4 deletions
main.py
+
7
−
4
View file @
c7ac3de2
from
itertools
import
chain
import
matplotlib.pyplot
as
plt
#
import matplotlib.pyplot as plt
class
TabletteChocolat
:
def
__init__
(
self
,
m
:
int
,
n
:
int
):
...
...
@@ -27,9 +27,9 @@ class TabletteChocolat :
'''
resultat
=
[]
for
i
in
range
(
1
,
self
.
n
)
:
resultat
.
append
(
i
,
0
)
resultat
.
append
(
(
i
,
0
)
)
for
k
in
range
(
1
,
self
.
m
)
:
resultat
.
append
(
0
,
j
)
resultat
.
append
(
(
0
,
k
)
)
return
chain
(
resultat
)
def
est_possible
(
self
,
couple_i_j
)
:
...
...
@@ -41,13 +41,16 @@ class TabletteChocolat :
def
plot
(
self
)
:
plt
.
gca
().
set_aspect
(
'
equal
'
)
plt
.
axis
(
'
off
'
)
plt
.
fill
([
0
,
self
.
m
,
self
.
n
,
0
],)
plt
.
fill
([
0
,
self
.
m
,
self
.
n
,
0
]
,
[
0
,
0
,
self
.
m
,
self
.
n
]
,
color
=
'
#D5B799
'
)
plt
.
show
t
=
TabletteChocolat
(
3
,
4
)
print
(
t
)
print
(
list
(
t
.
coups_possibles
()))
if
__name__
==
"
main
"
:
import
doctest
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment