Question: To solve this problem, I ll walk through the steps and how the code can structured. Here s the implementation: 5 . You are working
To solve this problem, Ill walk through the steps and how the code can structured. Heres the implementation:
You are working at KFC and must enter each product sold and calculate the profit you made at the end of the day. You decided to automate the selling and calculating the profit for the day. KFC sells two products: ZINGER and CHICKEN.
Use the starter code provided below.
Create a user prompt to input a burger sale and then store the sale in a file
The name of the file should be your initialsKFCtxt
If the user enters R show the total sale amount and profit, and the program stops.
R can be entered in upper or lowercase.
ZINGER sells for $ and costs $ to make.
CHICKEN sells for $ and costs $ dollars to make.
Message to the user to enter data should be:
Please choose one of the following options:
ZINGER, CHICKEN, R Report
Message to the user after r is pressed should be values will vary based on sales:
For Example: You made $ The profit is $
OUTPUT OF TEXT FILE:
# Display menu options
def printoptions:
return
# Ask for user input until input is input
def validateuserinput:
return response
#update the file with the product sold
def updatefilefilehandle, response:
return
#Display the daily profit
def displaydailyprofitFILENAME, KFCMEALCOST, KFCMEALPRICE, KFCCHICKENCOST, KFCZINGERPRICE:
return
# Main
KFCMEALCOST
KFCMEALPRICE
KFCCHICKENCOST
KFCZINGERPRICE
FILENAME KFCtxt
while True:
PYTHON CODE DONT USE AI OR CHATGPT
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
