You have been asked by Digital Technologies Geelong to develop a small Python program to be used at Brunnings Hardware. The program is to calculate the total of a series of purchases made by a...

1 answer below »
yes


You have been asked by Digital Technologies Geelong to develop a small Python program to be used at Brunnings Hardware. The program is to calculate the total of a series of purchases made by a customer and then process their payment. The program is started again for each customer. Call your program As2Hardware.py 1. You should first enter the customer name. 2. You should then enter the price of a purchased item which is added to a running total. Prices of purchased items should continue until a price of zero is entered, indicating the end of the customer’s purchases. 3. The total amount to be paid is then displayed and a method of payment should be entered using a simple menu. (You must allow for both upper and lower case menu selections). 4. For a credit card payment, if the total owing is less than $20.00, the system should display a message reminding the cashier that the minimum credit card purchase is $20.00 and this transaction will be processed as a cash sale (see below for details), otherwise, if the total owing is $20.00 or more, a message to process the credit card should be displayed and the program should end. 5. For a cash sale, the program should prompt for the amount the customer has tendered and calculate and display the change. 6. Finally, when the transactions are complete, write the last message to a text file called output.txt For simplicity, assume no mistakes are made while entering data. See the over page for a series of screenshots that will help you understand what is required. Your output must closely resemble that on the following pages. The completed assignment consists of a copy of your Python source code. Your assignment will be assessed on the following:- 1. Compiles and runs correctly (ensure your program is tested!) 2. Correct syntax 3. Internal documentation of code (ie: adequate commenting of code, including your identification) 4. Appropriate data types are implemented 5. Appropriate library files are included for the use of methods and classes ????? -functions e.g. input(), print(), format(), float() are all built-in library functions 6. A Word document detailing the test data you used, and screenshots of the results of those tests. The following screenshots show how your output should look under different circumstances. In each case, the highlighted section should be written to the text file. You buy 3 items for 11.35, 45.67, and 34.53, opting to pay cash, tendering $100 as payment. You buy 3 items for 11.35, 45.67, and 34.53, opting to pay with a credit card. You buy 1 item for 11.35, opting to pay with a credit card. Assignment 2 Assignment 2 Scenarios to include in testing data Trying to make Credit Transaction for <$20 card transaction –goes straight through money tendered, change given. money payment – correct amount files to submit. the working python file yournamehardware.py word document to show the testing. zip the two together and submit. card="" transaction="" –goes="" straight="" through="" money="" tendered,="" change="" given.="" money="" payment="" –="" correct="" amount="" files="" to="" submit.="" the="" working="" python="" file="" yournamehardware.py="" word="" document="" to="" show="" the="" testing.="" zip="" the="" two="" together="" and="">
Answered 1 days AfterMar 29, 2021

Answer To: You have been asked by Digital Technologies Geelong to develop a small Python program to be used at...

Vibhav answered on Mar 30 2021
162 Votes
hardware/1.JPG
hardware/2.JPG
hardware/3.JPG
hardware/4.JPG
hardware/As2Hardware.py
c_name = in
put("Enter your name: ")
total = 0
while(True):
choice = input("Enter item price (0 to end): ")
if choice=="0":
break
price = float(choice)
total += price
print("Total: $", total)
print()
print("C: Credit")
print("M: Money")
pay_method = input("Enter payment method: ")
filename = "output.txt"
with open(filename, 'w') as file:
if total<20 and pay_method in ["C", "c"]:
print("BRUNNINGS HARDWARE - Cash Transaction")
print("Total: $", total, " is less than $20.00",...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here