Commit 8e898aaf authored by marcin.wrobel's avatar marcin.wrobel

Upload New File

parent c2e8b7c8
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment