Question: Write a python program. I have attached what I have so far. Based on what I have write the second part. HERE IS MY PYTHON
Write a python program. I have attached what I have so far. Based on what I have write the second part.



HERE IS MY PYTHON CODE SO FAR:
PROJECT PART 1
customer_name = '' street_address = '' city = '' state = '' zip_code = '' orderTotal = '' orderSummary = '' counter = 0 item_number_list = [] items_quantity_list = [] def calculate_total(products_list, product_price, item_number_list, items_quantity_list): subtotal = 0 partial_summary = 0 while counter 'Motor', 'Resistor', 'Capacitor', 'Circuit Board', 'Soldering Kit', 'Arduino Kit', 'Laptop', 'iPhoneX', 'TV', 'XBOX one', 'Desktop', 'Calculator'] product_price = ['15.99', '12.50', '14.00', '10.00', '35.99', '50.00', '400.00', '850.00', '400.00', '350.00', '380.00', '69.99'] print("Luis' General Store") print(" Item Number" + '\t\t\t' "Item Name" + '\t\t' + "Price") print("-------------" + '\t\t' "---------" + '\t\t' + "------") print("1" + '\t\t\t\t\t' + "Motor" + '\t\t\t' + "15.99") print("2" + '\t\t\t\t\t' + "Resistor" + '\t\t' + "12.50") print("3" + '\t\t\t\t\t' + "Capacitor" + '\t\t' + "14.00") print("4" + '\t\t\t\t\t' + "Circuit Board" + '\t' + "10.00") print("5" + '\t\t\t\t\t' + "Soldering Kit" + '\t' + "35.99") print("6" + '\t\t\t\t\t' + "Arduino Kit" + '\t\t' + "50.00") print("7" + '\t\t\t\t\t' + "Laptop" + '\t\t\t' + "400.00") print("8" + '\t\t\t\t\t' + "iPhoneX" + '\t\t\t' + "850.00") print("9" + '\t\t\t\t\t' + "TV" + '\t\t\t\t' + "400.00") print("10" + '\t\t\t\t\t' + "XBOX one" + '\t\t' + "350.00") print("11" + '\t\t\t\t\t' + "Desktop" + '\t\t\t' + "380.00") print("12" + '\t\t\t\t\t' + "Calculator" + '\t\t' + "69.99") usersResponse = input(' Would you like to order a product?[Y/N]') while usersResponse == 'y' or usersResponse == 'Y': itemNum = int(input('Enter an item number: ')) item_number_list.append(itemNum - 1) quantityNum = int(input('Enter a quantity: ')) items_quantity_list.append(quantityNum) usersResponse = input('Would you like to purchase another product?[Y/N]') # if item_number_list customer_name = str(input('Enter your name: ')) street_address = input('Enter your street address: ') city = input('Enter the city: ') zip_code = input('Enter the zip code: ')
Page 2 of 2 CSC 121 Project Part 2 Use the StoreKeeper file that you created for Project Part 1, and add all of the following The code for Part 1 had some variables at the top. We will need more variables for this part, so declare these variables after the ones at the top o A variable for customer name. Set it equal to" o A variable for street address. Set it equal to " o A variable for city. Set it equal to" o A variable for state. Set it equal to" o A variable for zip code. Set it equal to 0 o A variable for order total. Set it equal to 0 o A variable for order summary. Set it equal to" The code for Part 1 ended with a loop. After that loop do an IF statement to determine if the list for item numbers has anything in it. If it does not, print a message thanking the user for browsing If it does, do all of the following o Ask the user to input their name, and store it in the customer name variable that you declared above o Do the same (get input) for address, city, state o Next you will call a function called o The function should accept 4 arguments, the 4 and zip code calculate Total lists (the products list, the prices list, the item numbers list, and the quantity list) o The function should do the following (it is best to declare your function toward the top of your program, directly before or directly after all your variable declarations): o Declare a subtotal variable and set it equal to0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
