Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AP-WALLOT-Angy
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
Angy Wallot
AP-WALLOT-Angy
Commits
d01da08d
Commit
d01da08d
authored
1 year ago
by
Angy Wallot
Browse files
Options
Downloads
Patches
Plain Diff
tp.4
parent
b2a389ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tp.4/etudiants/etudiant.py
+9
-3
9 additions, 3 deletions
tp.4/etudiants/etudiant.py
with
9 additions
and
3 deletions
tp.4/etudiants/etudiant.py
100644 → 100755
+
9
−
3
View file @
d01da08d
...
...
@@ -9,7 +9,6 @@
"""
from
date
import
Date
class
Etudiant
:
"""
une classe représentant des étudiants.
...
...
@@ -49,7 +48,12 @@ class Etudiant:
précondition : le nip, le nom et le prénom ne peuvent être nuls ou vides.
"""
...
self
.
nip
=
init_nip
self
.
nom
=
init_nom
self
.
prenom
=
init_prenom
self
.
naissance
=
init_naissance
self
.
formation
=
init_formation
self
.
groupe
=
init_groupe
def
__eq__
(
self
,
other
)
->
bool
:
"""
...
...
@@ -59,7 +63,9 @@ class Etudiant:
- même prénom que `self`,
et False sinon.
"""
...
return
self
.
nip
==
other
.
nip
and
\
self
.
nom
==
other
.
nom
and
\
self
.
prenom
==
other
.
prenom
def
__lt__
(
self
,
other
)
->
bool
:
"""
...
...
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