Commit cc277dcb authored by essie.lee's avatar essie.lee

Upload New File

parent 42a84fce
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
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