I'm making a pizza operator program for school. what is basically does is it asks for the customers name, asks if you want pickup or delivery etc. The problems I have encountered is that when I don't type anything into the input it will give the error to make you input it but then will automatically stop the program. I would like it to repeat itself. and also I have a bug in get_user_info when I click 1, 2 or 3 it does nothing but go in a infinite loop which I cannot seem to solve. I hope you guys could help me thank you very much in advance.
Regards, Johnathon
My code
premium_pizzas = ["Supreme Cheese", "The Legendary pizza", "Pentakill supreme", "Teeto shroomo supreme", "The volcanic rengar", "Cheese and Ham" , "Vegetriano" ]
gourmet_pizzas = ["Flame Gorrila", "Snazzy chicken", "Intergalactic BBQ", "BBQ Chicken"]
#premium_pizzas = 8.50
#gourmet_pizzas = 5.00
customer_name = ""
def get_customer_name():
customer_name =input("what is your name?\n\t")
if customer_name is "":
print("Error please enter a name!\n\t")
#else: get_user_info()
def get_delivery_details():
get_address = input("Please enter a delivery address\n\t:")
if get_address == "":
print("error you must enter a address")
get_phone_number = str(input("please enter your phone number"))
if get_phone_number is "":
print("Input must be an integer(numbers only)")
if get_phone_number is "abcdefghijklmnopqrstuvwxyz":
print("Input must be an integer(numbers only)")
else:
get_pizza_list()
def get_pizza_list():
for i in range (0,6):
None
def get_user_info():
while not get_user_info == "0":
user_input=str(input("Press 1 for delivery press\nPress 2 for pickup\nPress 3 to exit\n\t:"))
if get_user_info == "1":
get_delivery_details()
elif get_user_info == "2":
get_pizza_list()
elif get_user_info == "3":
exit
#get_user_info()
get_customer_name
#get_delivery_details()
#get_pizza_list()