#to see if the customer would like to keep shopping
more = 'y'
# list to see pie purchases
purchases = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

# pie list
pie_list = ['Pecan', 'Apple Crisp', 'Bean', 'Banoffee', 'Black Bun', 'Blueberry', 'Buko', 'Burek', 'Tamale', 'Steak']

#welcome message:
print ("Welcome to House of Pies! Here are our pies:")

# while shopping: 
while more == 'y': 
    print("---------------------------------------------------------------------")
    print("(1) Pecan, (2) Apple Crisp, (3) Bean, (4) Banoffee, " +
          " (5) Black Bun, (6) Blueberry, (7) Buko, (8) Burek, " +
          " (9) Tamale, (10) Steak ")
    pie_choice = int(input('Which pie would you like?'))
   # index of pie in list would be input - 1!  
    pie_index = pie_choice - 1
    purchases[pie_index] += 1
    
    print("---------------------------------------------------------------------")
    
    #pie purchase
    print(f"Great! We'll have that {pie_list[pie_index]} pie right out for you.")
    
    #asking if they would like more
    more = input('Would you like more pies? (y)es or (n)o. ')
    
print("---------------------------------------------------------------------")

#count pies
print('You bought:')

#looping through pie list
for pie_index in range(len(pie_list)):
    pie_count = str(purchases[pie_index])
    pie_name = str(pie_list[pie_index])
    
    # put together list of pie purchases and print
    print(pie_count + " " + pie_name)
    
    
    
    
    
    
    
    
    