1 Logic Main Prompt You are tasks to create a program that would help a customer at Honeybee’s Cafe tabulate their total purchase bill. Create the Logic that would do the following. 1. Read the file...

1 answer below »
1 Logic Main Prompt You are tasks to create a program that would help a customer at Honeybee’s Cafe tabulate their total purchase bill. Create the Logic that would do the following. 1. Read the file Honeybee Cafe menu.txt and display to the user for selection: • Each item selection number • Each item name • Each item price 2. Allow user to continuously enter selection or a sentinel value to quit 3. Track all items and tabulate the subtotal cost 4. Account for discount based on: subtotal < $10="" no="" discount="" $10="" ≤="" subtotal="">< $25="" discount="-5%" $25="" ≤="" subtotal="">< $50="" discount="-10%" $10="" ≤="" subtotal="">< $100 discount = -20% 5. calculate tax based on 9.075% of the subtotal (after discount if applied) 6. calculate the total bill and the sum of subtotal + tax 7. suggest tip amount of 15%, 18%, and 20% of non-taxed but discounted subtotal 8. display total bill with a list of purchased items and 4 additional line that includes: • total billed amount • total billed amount + 15% tip • total billed amount + 18% tip • total billed amount + 20% tip 9. output the entire display into a text file called customer bill.txt 1 2 submission requirements • sketch a flowchart or write a pseudocode for the aforementioned logic (30%) – submit one file on canvas for your flowchart of pseudocode in .pdf format • based on the flowchart or pseudocode, create a python script (70%) – include all modules/methods/functions inside the main script file – submit one file on canvas for your main script file in .py format 3 extra credit (10%) if the user selects items in the following order: (5, 5, 2, 2, 3, 1, 5, 2, 4, 1), that is the secret code for the cafe to discount all items 100%. implement this secret code into your script. it should still output the total bill, but show at the end the amount is discounted 100%. $100="" discount="-20%" 5.="" calculate="" tax="" based="" on="" 9.075%="" of="" the="" subtotal="" (after="" discount="" if="" applied)="" 6.="" calculate="" the="" total="" bill="" and="" the="" sum="" of="" subtotal="" +="" tax="" 7.="" suggest="" tip="" amount="" of="" 15%,="" 18%,="" and="" 20%="" of="" non-taxed="" but="" discounted="" subtotal="" 8.="" display="" total="" bill="" with="" a="" list="" of="" purchased="" items="" and="" 4="" additional="" line="" that="" includes:="" •="" total="" billed="" amount="" •="" total="" billed="" amount="" +="" 15%="" tip="" •="" total="" billed="" amount="" +="" 18%="" tip="" •="" total="" billed="" amount="" +="" 20%="" tip="" 9.="" output="" the="" entire="" display="" into="" a="" text="" file="" called="" customer="" bill.txt="" 1="" 2="" submission="" requirements="" •="" sketch="" a="" flowchart="" or="" write="" a="" pseudocode="" for="" the="" aforementioned="" logic="" (30%)="" –="" submit="" one="" file="" on="" canvas="" for="" your="" flowchart="" of="" pseudocode="" in="" .pdf="" format="" •="" based="" on="" the="" flowchart="" or="" pseudocode,="" create="" a="" python="" script="" (70%)="" –="" include="" all="" modules/methods/functions="" inside="" the="" main="" script="" file="" –="" submit="" one="" file="" on="" canvas="" for="" your="" main="" script="" file="" in="" .py="" format="" 3="" extra="" credit="" (10%)="" if="" the="" user="" selects="" items="" in="" the="" following="" order:="" (5,="" 5,="" 2,="" 2,="" 3,="" 1,="" 5,="" 2,="" 4,="" 1),="" that="" is="" the="" secret="" code="" for="" the="" cafe="" to="" discount="" all="" items="" 100%.="" implement="" this="" secret="" code="" into="" your="" script.="" it="" should="" still="" output="" the="" total="" bill,="" but="" show="" at="" the="" end="" the="" amount="" is="" discounted="">
Answered Same DayJun 02, 2021

Answer To: 1 Logic Main Prompt You are tasks to create a program that would help a customer at Honeybee’s Cafe...

Aditya answered on Jun 03 2021
132 Votes
solution/addOrder.jpg
solution/Customer_bill.txt
Bill Details
coffee (small) 1.75
coffee (medium) 2.25
coffee (large) 2.5
fountain drink 1.75
cappuccino 3.75
Total Bille
d Amount: 12.43
Total Billed Amount + 15% tip 13.11
Total Billed Amount + 18% tip 13.45
Total Billed Amount + 20% tip 13.68
solution/honeybeecafemenu.txt
coffee (small)        1.75
coffee (medium)        2.25
coffee (large)        2.50
fountain drink        1.75
cappuccino        3.75
matcha latte        4.00
hot chocolate        3.00
cream bagel        2.00
grilled chicken panini        6.50
california omelette        7.50
ham & cheese sandwich        5.50
club sandwich        6.50
chocolate chip cookie        1.00
ice cream cone        3.50
fruit tart        3.75
solution/main.jpg
solution/main.py
selection_numbers =[]
name = []
price = []
selection_number = 1
total_amount = 0
temp=0
print("Welcome to the Honey Bee Cafe")
print("Select from the below menu")
f = open("honeybeecafemenu.txt", "r")
listOfLines = f.readlines()
f.close()
def add_order(order_no):
order_detail = listOfLines[order_no-1].strip()
item = order_detail.split('\t\t',1)
selection_numbers.append(order_no)
name.append(item[0])
price.append(float(item[1]))
print(item[0]," is added to you order")
def total_bill():
code=[5, 5, 2, 2, 3, 1, 5, 2, 4, 1]
file = open("Customer_bill.txt", "w")
file.writelines("Bill Details")
sub_total = sum(price)
if sub_total<10:
total_amount = sub_total;
elif sub_total >= 10 and sub_total<25:
total_amount = sub_total - (0.05*sub_total)
elif sub_total >= 25 and sub_total<50:
total_amount = sub_total - (0.1*sub_total)
elif sub_total >= 50 and sub_total < 100:
total_amount = sub_total - (0.2 * sub_total)
else:#if amount...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here