Beruflich Dokumente
Kultur Dokumente
def cof_cho(cs):
print("Your", coffee[cs][0], "is being prepared.")
print("Please pay", "${:.2f}".format(coffee[cs][1]), "n")
cof_sel = [ ]
def sho_cho(cs):
# I would like for every cs coming from line 31 to append cof_sel
# and print the list accordingly, each cs chosen should link
# to the sh_name whereas all the cs chosen by sh_name is able to be
# added for a sum total using coffee.index[1]
# I beleive coffee.index[1] is float so I think it needs to be changed
# to integer for addition then printed
for name in sh_name:
sh_name = input("Hello, please enter your name: ___")
while cs != 0:
cs = int(input("Choose your numbered coffee selection or 0 to Quit: "))
if cs != 0:
cof_sel.append(cs)
print("Hello", sh_name)
print("Your coffee selections are: ", coffee[cs][0])
return sho_cho(cs)
repeat = True;
while repeat:
y_n_in = input("Would you like to start a coffee order? n y or n: ")
print()
if y_n_in.lower() == "y":
while True:
for prd in coffee:
print("{}. ".format(coffee.index(prd) + 1), end='')
print("{:20}${:.2f}".format(prd[0], prd[1]))
cs = int(input("Choose your numbered coffee selection or 0 to Quit: "))
while cs != 0:
if cs != 0:
cs -= 1
sho_cho(cs)
break
else:
break
print("Enter a selection of 1 -", len(coffee), "in menu or 0 to quit")
if cs == 0:
print("Thank You, Come Again.n")
elif y_n_in.lower() == "n":
print("Thank you. Goodbye! n")
break
else:
print("Enter y or n, please!")