Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ap Almohamedalsadou Fatima
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fatima Almohamed Alsadou
Ap Almohamedalsadou Fatima
Commits
b2592d44
Commit
b2592d44
authored
1 year ago
by
Almohamed Alsadou Fatima
Browse files
Options
Downloads
Plain Diff
resolution conflit
parents
8afcebe1
fca09ee4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TP5/minesweeper/cell.py
+4
-2
4 additions, 2 deletions
TP5/minesweeper/cell.py
TP6/associations/dicotrie.py
+12
-11
12 additions, 11 deletions
TP6/associations/dicotrie.py
with
16 additions
and
13 deletions
TP5/minesweeper/cell.py
+
4
−
2
View file @
b2592d44
...
...
@@ -112,8 +112,10 @@ class Cell:
if
self
.
is_bomb
:
return
'
B
'
else
:
return
str
(
self
.
nbombs_in_neighborhood
)
if
self
.
nbombs_in_neighborhood
:
return
'
1
'
else
:
return
'
0
'
else
:
return
'
'
...
...
This diff is collapsed.
Click to expand it.
TP6/associations/dicotrie.py
+
12
−
11
View file @
b2592d44
...
...
@@ -73,17 +73,7 @@ class DicoTrie:
$$$ d1
DicoTrie([Association(
"
a
"
, 1), Association(
"
b
"
, 2), Association(
"
c
"
, 3)])
"""
# res=[]
# for elt in self:
# res.append(self.liste_assos)
#
# res.add(self.cle,self.valeur)
#
# return res
self
.
liste_assos
[
cle
]
=
valeur
self
.
liste_assos
[
cle
]
=
valeur
def
__getitem__
(
self
,
cle
:
C
)
->
V
:
...
...
@@ -96,7 +86,12 @@ class DicoTrie:
$$e d1[
'
c
'
]
KeyError
"""
<<<<<<<
HEAD
self
.
liste_assos
[
cle
]
=======
return
self
.
liste_assos
[
cle
]
>>>>>>>
fca09ee4d9aa6d43a18b3f54109c30cc7e3cac49
def
__delitem__
(
self
,
cle
:
C
)
->
NoneType
:
"""
...
...
@@ -107,10 +102,14 @@ class DicoTrie:
$$e del d1[
'
c
'
]
KeyError
"""
<<<<<<<
HEAD
=======
del
self
.
liste_assos
[
cle
]
>>>>>>>
fca09ee4d9aa6d43a18b3f54109c30cc7e3cac49
def
__contains__
(
self
,
cle
:
C
)
->
bool
:
"""
...
...
@@ -126,6 +125,8 @@ class DicoTrie:
# if cle==x:
# return True
if
__name__
==
'
__main__
'
:
import
apl1test
apl1test
.
testmod
(
'
dicotrie.py
'
)
...
...
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