Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eventPlanningSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
essie.lee
eventPlanningSystem
Commits
58659a48
Commit
58659a48
authored
Jan 13, 2023
by
sully.khalifa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
second commit
parent
c6257a35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
eventPage.py
eventPage.py
+33
-0
eventPage2.py
eventPage2.py
+31
-0
No files found.
eventPage.py
0 → 100644
View file @
58659a48
class
Student
:
def
__init__
(
self
,
name
,
age
,
grade
):
self
.
name
=
name
self
.
age
=
age
self
.
grade
=
grade
# 0 - 100
def
get_grade
(
self
):
return
self
.
grade
class
Course
:
def
__init__
(
self
,
name
,
max_students
):
self
.
name
=
name
self
.
max_students
=
max_students
self
.
students
=
[]
def
add_students
(
self
,
student
):
if
len
(
self
.
students
)
<
self
.
max_students
:
self
.
students
.
append
(
student
)
return
True
return
False
def
get_average_grade
(
self
):
pass
s1
=
Student
(
"Tim"
,
19
,
25
)
s2
=
Student
(
"Bill"
,
19
,
75
)
s3
=
Student
(
"Jill"
,
19
,
65
)
course
=
Course
(
"Science"
,
2
)
course
.
add_students
(
s1
)
course
.
add_students
(
s2
)
print
(
course
.
students
[
0
]
.
name
)
\ No newline at end of file
eventPage2.py
0 → 100644
View file @
58659a48
class
Events
:
def
__init__
(
self
,
name
,
organiser
,
description
):
self
.
name
=
name
self
.
organiser
=
organiser
self
.
description
=
description
# describing the event
def
get_name
(
self
):
return
self
.
name
class
Invitees
:
def
__init__
(
self
,
name
,
plus_one
,
max_invitees
):
self
.
name
=
name
self
.
plus_one
=
plus_one
self
.
max_invitees
=
max_invitees
self
.
events
=
[]
def
add_invitees
(
self
,
name
):
if
len
(
self
.
events
)
<
self
.
max_invitees
:
self
.
events
.
append
(
event
)
return
True
return
False
def
get_average_grade
(
self
):
pass
event1
=
Events
(
"Testing"
,
"Jack"
,
"first edition"
)
event2
=
Events
(
"Release"
,
"John"
,
"Main release"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment