Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Application 2
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
marcin.wrobel
Application 2
Commits
8e898aaf
Commit
8e898aaf
authored
Jan 20, 2023
by
marcin.wrobel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
c2e8b7c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
0 deletions
+107
-0
Application_2_program.py
Application_2_program.py
+107
-0
No files found.
Application_2_program.py
0 → 100644
View file @
8e898aaf
event
=
[]
invited
=
[]
mealOpp
=
[
"chicken dinner"
,
"spaghetti bolognese"
,
"fish and chips"
]
customerMeal
=
[]
def
nEvent
():
class
newEvent
:
while
True
:
eventName
=
input
(
"Name of the Event: "
)
organiser
=
input
(
"Orginiser Name: "
)
eventDesc
=
input
(
"Event Description: "
)
eventDetails
=
eventName
,
organiser
,
eventDesc
event
.
append
(
eventDetails
)
break
def
newinvitee
():
class
inv
:
while
True
:
name
=
input
(
"Enter name: "
)
rs
=
input
(
"has the invited person RSVPd? "
)
print
(
', '
.
join
(
mealOpp
))
mainMeal
=
input
(
"Which meal would you like? "
)
while
mainMeal
.
lower
()
not
in
mealOpp
:
mainMeal
=
input
(
mainMeal
+
" Not an option, please try again: "
)
plus
=
input
(
"Does the perosn have a plus one? "
)
if
plus
.
lower
()
==
'yes'
:
namePlus
=
input
(
"Plus one name: "
)
print
(
', '
.
join
(
mealOpp
))
plusMeal
=
input
(
"Which meal would your plus one like? "
)
while
plusMeal
.
lower
()
not
in
mealOpp
:
plusMeal
=
input
(
plusMeal
+
" Not an option, please try again: "
)
requierments
=
input
(
"Do you or the plus one have any special requierments? "
)
if
requierments
.
lower
()
==
'yes'
:
req
=
input
(
"Please specify requierments: "
)
details
=
name
,
rs
,
namePlus
,
req
mealDetails
=
mainMeal
,
plusMeal
invited
.
append
(
details
)
customerMeal
.
append
(
mealDetails
)
elif
requierments
.
lower
()
==
'no'
:
req
=
"none"
details
=
name
,
rs
,
namePlus
,
req
mealDetails
=
mainMeal
,
plusMeal
invited
.
append
(
details
)
customerMeal
.
append
(
mealDetails
)
elif
plus
.
lower
()
==
'no'
:
requierments
=
input
(
"Do you or the plus one have any special requierments? "
)
if
requierments
.
lower
()
==
'yes'
:
plusMeal
=
"none"
req
=
input
(
"Please specify requierments: "
)
details
=
name
,
rs
,
mainMeal
,
namePlus
,
plusMeal
,
req
invited
.
append
(
details
)
elif
requierments
.
lower
()
==
'no'
:
req
=
"none"
namePlus
=
"none"
plusMeal
=
"none"
details
=
name
,
rs
,
namePlus
,
req
mealDetails
=
mainMeal
,
plusMeal
invited
.
append
(
details
)
customerMeal
.
append
(
mealDetails
)
add
=
input
(
"would you like to add another customer? "
)
if
add
.
lower
()
==
'yes'
:
continue
elif
add
.
lower
()
==
'no'
:
newEv
=
input
(
"Would you like to make a new event? "
)
if
newEv
.
lower
()
==
'yes'
:
nEvent
()
elif
newEv
.
lower
()
==
'no'
:
print
(
"
\n
"
)
def
outD
():
return
outDetails
()
print
(
"
\n
"
)
break
def
outDetails
():
class
outDetails
:
for
eve
,
inv
in
zip
(
event
,
invited
,):
print
(
"Event name:"
,
eve
[
0
],
"Event orginiser:"
,
eve
[
1
],
"Event description:"
,
eve
[
2
])
print
(
"-"
*
150
)
print
(
"Name:"
,
"|"
.
center
(
15
),
"RSPd"
,
"|"
.
center
(
15
),
"Meal"
,
"|"
.
center
(
20
),
"Plus one name:"
,
"|"
.
center
(
15
),
"Plus one meal:"
,
"|"
.
center
(
20
)
,
"Requirements"
,
"|"
.
center
(
15
)
)
print
(
"-"
*
150
)
print
(
inv
[
0
],
"|"
.
center
(
15
),
inv
[
1
],
"|"
.
center
(
15
),
"|"
.
center
(
20
),
inv
[
2
],
"|"
.
center
(
15
),
"|"
.
center
(
20
),
inv
[
3
],
"|"
.
center
(
15
))
print
(
"-"
*
150
)
nEvent
()
newinvitee
()
outDetails
()
\ 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