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
cc277dcb
Commit
cc277dcb
authored
Jan 17, 2023
by
essie.lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
42a84fce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
172 additions
and
0 deletions
+172
-0
1.py
1.py
+172
-0
No files found.
1.py
0 → 100644
View file @
cc277dcb
class
Event
:
def
getEventName
():
e_name
=
input
(
"Enter event name >>> "
)
def
getOrganiserName
():
o_name
=
input
(
"Enter organiser name >>> "
)
class
Meal
:
def
__init__
(
self
,
starter
,
main
,
drinks
):
self
.
starter
=
starter
self
.
main
=
main
self
.
drinks
=
drinks
starter
=
[]
main
=
[]
drinks
=
[]
def
inputMeal
(
self
,
starter
,
main
,
drinks
):
iM_menu
=
0
while
iM_menu
!=
4
:
print
(
"**************************************"
)
print
(
" ADD MEAL"
)
print
(
"**************************************"
)
print
(
" 1. Starter"
)
print
(
" 2. Main"
)
print
(
" 3. Drinks"
)
print
(
" 4. Exit"
)
print
(
"======================================"
)
iM_menu
=
int
(
input
(
"Select >>> "
))
if
iM_menu
==
1
:
s
=
input
(
"Enter starter menu to add (Press 'Enter' key to finish) >>> "
)
if
s
in
starter
:
print
(
"Already exist"
)
continue
else
:
if
len
(
s
)
!=
0
:
starter
.
append
(
s
)
else
:
print
()
break
elif
iM_menu
==
2
:
m
=
input
(
"Enter main menu to add (Press 'Enter' key to finish) >>> "
)
if
m
in
main
:
print
(
"Already exist"
)
continue
else
:
if
len
(
m
)
!=
0
:
main
.
append
(
m
)
else
:
print
()
break
elif
iM_menu
==
3
:
d
=
input
(
"Enter drinks to add (Press 'Enter' key to finish) >>> "
)
if
d
in
drinks
:
print
(
"Already exist"
)
continue
else
:
if
len
(
d
)
!=
0
:
drinks
.
append
(
d
)
else
:
print
()
break
elif
iM_menu
==
4
:
print
(
"Meals entered successfully"
)
break
else
:
print
(
"Wrong number"
)
print
()
class
Invitee
:
def
__init__
(
self
,
inviteename
,
i_dict
,
i_list
):
self
.
inviteename
=
inviteename
self
.
i_dict
=
i_dict
self
.
i_list
=
i_list
inviteename
=
[]
i_dict
=
{}
i_list
=
[]
counter
=
0
sizeofinviteename
=
len
(
inviteename
)
while
counter
!=
sizeofinviteename
:
i_dict
=
{
inviteename
[
counter
]:
i_list
}
counter
+=
1
def
getinviteeName
(
self
,
inviteename
):
self
.
inviteename
=
inviteename
i_name
=
'abc'
while
len
(
i_name
)
!=
0
:
i_name
=
input
(
"Enter Invitee Names to add (Press 'Enter' key to finish) >>> "
)
inviteename
.
append
(
i_name
)
def
trackRSVPd
(
self
,
inviteename
):
for
index
,
value
in
enumerate
(
inviteename
,
start
=
1
):
print
(
index
,
". "
,
value
)
i
=
0
while
i
!=
-
1
:
i
=
int
(
input
(
"Select Invitee (Press '0' to finish) >>> "
))
-
1
RSVPd
=
input
(
"has RSVPd? (Y/N) >>> "
)
if
RSVPd
==
'Y'
or
'y'
:
continue
elif
RSVPd
==
'N'
or
'n'
:
del
inviteename
[
i
]
else
:
print
(
"Wrong Key"
)
print
()
def
trackPlusOne
(
self
,
inviteename
,
i_list
):
for
index
,
value
in
enumerate
(
inviteename
,
start
=
1
):
print
(
index
,
". "
,
value
)
j
=
0
while
j
!=
-
1
:
j
=
int
(
input
(
"Select Invitee (Press '0' to finish) >>> "
))
-
1
plus1
=
input
(
"has plus one? (Y/N) >>> "
)
if
plus1
==
'Y'
or
'y'
:
i_list
[
0
]
=
"Plus One: Y"
self
.
getinviteeName
()
elif
plus1
==
'N'
or
'n'
:
i_list
[
0
]
=
"Plus One: N"
break
else
:
print
(
"Wrong key"
)
print
()
def
trackdietary
(
self
,
inviteename
,
i_list
):
for
index
,
value
in
enumerate
(
inviteename
,
start
=
1
):
print
(
index
,
". "
,
value
)
k
=
1
while
k
!=
-
1
:
k
=
int
(
input
(
"Select Invitee (Press '0' to finish) >>> "
))
-
1
print
(
"Dietary Type | 1. Vegan 2. Lactose-Free 3. Gluten-Free 4. None"
)
dietary
=
int
(
input
(
"Select Dietary type >>> "
))
if
dietary
==
1
:
i_list
[
1
]
=
"Vegan"
elif
dietary
==
2
:
i_list
[
1
]
=
"Lactose-Free"
elif
dietary
==
3
:
i_list
[
1
]
=
"Gluten-Free"
elif
dietary
==
4
:
i_list
[
1
]
=
"None"
else
:
print
(
"Wrong key"
)
print
()
def
trackmeal
(
self
,
inviteename
,
i_list
):
i_meal
=
[]
for
index
,
value
in
enumerate
(
inviteename
,
start
=
1
):
print
(
index
,
". "
,
value
)
l
=
0
while
l
!=
-
1
:
l
=
int
(
input
(
"Select Invitee (Press '0' to finish) >>> "
))
-
1
print
(
"**************"
)
print
(
" Starter"
)
print
(
"**************"
)
for
index
,
value
in
enumerate
(
Meal
.
starter
,
start
=
1
):
print
(
index
,
". "
,
value
)
i_starter
=
int
(
input
(
"Select Starter >>> "
))
-
1
i_meal
[
0
]
=
Meal
.
starter
[
i_starter
]
print
(
"**************"
)
print
(
" Main"
)
print
(
"**************"
)
for
index
,
value
in
enumerate
(
Meal
.
main
,
start
=
1
):
print
(
index
,
". "
,
value
)
i_main
=
int
(
input
(
"Select Main >>> "
))
-
1
i_meal
[
1
]
=
Meal
.
main
[
i_main
]
print
(
"**************"
)
print
(
" Drinks"
)
print
(
"**************"
)
for
index
,
value
in
enumerate
(
Meal
.
drinks
,
start
=
1
):
print
(
index
,
". "
,
value
)
i_drinks
=
int
(
input
(
"Select Drinks >>> "
))
-
1
i_meal
[
2
]
=
Meal
.
drinks
[
i_drinks
]
i_list
[
2
]
=
i_meal
\ No newline at end of file
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