For this practice question I’m asked to create an e-list in python and then use that e-list to create an invoice. I can’t seem to get to the point to where my invoice works. My e-list coding is working and In the dark photo and the instructions for the invoice are in the white photo. Is there any way anybody could help me?
» ".format (name), end = **) company = input() 4. 6. print("Let's setup a sales menu for for '{0}',".format(company)) # 3 different list to store the information itemlame - (U itemPrice = [] itemQuantity - () 10 11 12 13 # for loop to íterate for 3 tímes for i in range(3): # input for name print("Enter item {0}'s name » ".format(í + 1), end = "") iName - input () # input for price print("Enter item {0}'s unity príce » " .format (1+1), end = *") iprice - input() # infinite loop while(True): # if price entered is not number if iPrice.isalpha(): 14 15 16 17 18 19 20 21 22 23 24 25 print("Price must be a number. Please enter again > ", end = "") iPrice = input() 26 27 # if price entered is negative if float(iPrice) < e:="" 28="" 29="" print("price="" must="" be="" positive.="" please="" enter="" again="">» ", end = "") iPrice = input() 30 31 32 else: 33 break #same as price print("Enter item {0}'s quantity » ".format(i+1), end = "D iQuantity = input() while(True): if iquantity.isalpha(): print("stock must be a number. Please enter again >» ", end = "") iQuantity = input() if int(iQuantity) < 0:="" print("stock="" must="" be="" positive.="" please="" enter="" again="">> ", end = "") iQuantity = input() 34 35 36 37 38 39 40 41 42 43 44 else: 45 break # adding data to list itemName.append(iName) itemPrice.append(iPrice) itemQuantity.append(iQuantity) 46 47 48 49 50 # printing the output for i in range(4): print("Great!") print(" print(": print("Please select the item you want") print("to buy from the following menu") for i in range(3): print("{0}.{1} (${2} each), {3} available".format((i+1), itemName[i], itemPric print("Press 4 when you are done!") print(" 51 52 53 54 -Welcome------ ") =====") 55 56 57 58 59 60 61 =========") "/>
Extracted text: name = input("Please enter your name » ") print("Hi (0}, please enter your company name >» ".format (name), end = **) company = input() 4. 6. print("Let's setup a sales menu for for '{0}',".format(company)) # 3 different list to store the information itemlame - (U itemPrice = [] itemQuantity - () 10 11 12 13 # for loop to íterate for 3 tímes for i in range(3): # input for name print("Enter item {0}'s name » ".format(í + 1), end = "") iName - input () # input for price print("Enter item {0}'s unity príce » " .format (1+1), end = *") iprice - input() # infinite loop while(True): # if price entered is not number if iPrice.isalpha(): 14 15 16 17 18 19 20 21 22 23 24 25 print("Price must be a number. Please enter again > ", end = "") iPrice = input() 26 27 # if price entered is negative if float(iPrice) < e:="" 28="" 29="" print("price="" must="" be="" positive.="" please="" enter="" again="">» ", end = "") iPrice = input() 30 31 32 else: 33 break #same as price print("Enter item {0}'s quantity » ".format(i+1), end = "D iQuantity = input() while(True): if iquantity.isalpha(): print("stock must be a number. Please enter again >» ", end = "") iQuantity = input() if int(iQuantity) < 0:="" print("stock="" must="" be="" positive.="" please="" enter="" again="">> ", end = "") iQuantity = input() 34 35 36 37 38 39 40 41 42 43 44 else: 45 break # adding data to list itemName.append(iName) itemPrice.append(iPrice) itemQuantity.append(iQuantity) 46 47 48 49 50 # printing the output for i in range(4): print("Great!") print(" print(": print("Please select the item you want") print("to buy from the following menu") for i in range(3): print("{0}.{1} (${2} each), {3} available".format((i+1), itemName[i], itemPric print("Press 4 when you are done!") print(" 51 52 53 54 -Welcome------ ") =====") 55 56 57 58 59 60 61 =========")
Extracted text: Tou this new file (a2_q2.py) that allows the following functionalities. 01 ap0ɔ ppP The user (customer) can now view the e-list to select itei..s for purchase. They should be able to select the items by entering the corresponding number from the list. Again, invalid selections should be handled with suitable error messages and the list should be repeated (see sample outputs below). Once the customer has selected a product, the program should ask how many of that product the customer would like to buy. Your program must make sure that selected products are available in stock, otherwise it should generate error messages and the menu should be repeated. After every valid selection is made, the current total should be printed, and the stock should be updated on the e-list (see sample outputs below). Page 5 of 10 Due: Oct. 16 11:00 PM EDT When the user completes product selection (i.e., enters 4), it should provide the user with their receipt. The receipt must show (a) the subtotal, (b) tax amount (13% of the subtotal) and (c) the total cost of the purchase. See sample outputs below. Sample output - 1: - it will first print the similar contents as shown in the previous part and then - Welcome Please select the item you want to buy from the following menu: 1. Spiked Umbrella ($7.25 each), 5 available 2. Voice Changer ($5.5 each), 10 available 3. Spy Camera ($15.0 each), 8 available Press 4 when you are done! Select product >> 1 You have selected the Spiked Umbrella, how many would you like to buy? >> 2 2 Spiked Umbrella(s) have been selected. Current total is $14.5. Please select the item you want to buy from the following menu: 1. Spiked Umbrella ($7.25 each), 3 available 2. Voice Changer ($5.5 each), 10 available 3. Spy Camera ($15.0 each), 8 available Press 4 when you are done! Select product >> 2 You have selected the Voice Changer, how many would you like to buy? >> three Quantity must be a number. Please enter again >> -3 Quantity must be positive. Please enter again >> 3 3 Voice Changer(s) have been selected. Current total is $31.e. Please select the item you want to buy from the following menu: 1. Spiked Umbrella ($7.25 each), 3 available 2. Voice Changer ($5.5 each), 7 available 3. Spy Camera ($15.e each), 8 available Press 4 when you are done! Select pcoduct >> 1