Hello! I need TUTOR who is good in explanation. Instruction:…
Question Answered step-by-step Hello! I need TUTOR who is good in explanation. Instruction:… Hello! I need TUTOR who is good in explanation. Instruction:Specify and Explain the functions of the codes present in the python program.Again I just need to have an explanation of the functions in each codes that was presented in the said program. Note: SKIP if you are not good in explanation. NO COPY-PASTED explanation in the internet.Here’s the python code: def main(): print(‘ n’) #Shop’s Name print(‘ ‘”********** ? WELCOME TO SUNRISE PUFFS CUPCAKES ? **********”) #Shop’s Tagline print(“”) print(“”) print(‘ ‘”A little treat that is fun and exciting to eat!”) print(“”) print(‘ ——————————————————————————————‘) print(“”) print(‘ ‘”Our Menu is divided into two (2) sections: Specialties and Drinks.”) print(“”) print(“”) print(‘ ‘”If you are ready, choose your best choice of cupcake or a”) print(‘ ‘”drink that will definitely quench your thirst from our Menu!”) print(“”) print(“”) print(‘ ‘”****** MENU ******”) print(“”) #Menu Codes and Prices for the Specialties print(‘ ‘”Specialties n Codes 12 dozen”) print(‘ ‘”””[A1] Coconut Cupcake with Toasted Coconut Frosting ………. P250.00 [A2] Dark Chocolate Cupcake with Peanut Butter Frosting ….. P230.00 [A3] Funfetti with Sprinkle Frosting …………………… P210.00 [A4] Mocha Cupcake with Espresso Frosting ………………. P240.00 [A5] Pumpkin Spice Latte Cupcake ………………………. P260.00 “””) #Menu Codes and Prices for the Drinks print(‘ ‘”Drinks n Codes S M L”) print(‘ ‘”””[B1] Espresso …………………….. P90.00 P120.00 P150.00 [B2] Iced Coffee ………………….. P90.00 P120.00 P150.00 [B3] Latte ……………………….. P90.00 P120.00 P150.00 [B4] Strawberry Milkshake ………….. P90.00 P120.00 P150.00 [B5] Chocolate Milkshake …………… P90.00 P120.00 P150.00 “””) print(“”) print(” ——————————————————————————————“) print(“”) #Code, Quantity and Size of teh product to order print(‘ ‘”NOTE: Enter one code at a time!”) print(“”) print(“”) order=input(‘ ‘”Greetings, Ma’am/Sir! May I take your order now? (Yes/No): “) ordered = True if (order == ‘Yes’): print(“”) print(‘ ‘”Great!”) print(“”) print(‘ ‘”May I know what is your order?”) else: print(“”) print(‘ ‘”Apologies for that. We do hope you’ll comeback again and order to us next time!”) print(“”) ordered = False if (ordered) : print(“”) code=input(‘ ‘”Enter the code of your chosen product: “) print(“”) product = “” quantity = 1 size = “” price = 0; #Specialties if (code == ‘A1’): product = “[A1] Coconut Cupcake with Toasted Coconut Frosting” price = 250 print(‘ ‘”Great choice!”, code+ ” is one of our best sellers here.”) print(“”) elif code == ‘A2’: product = “[A2] Dark Chocolate Cupcake with Peanut Butter Frosting” price = 230 print(‘ ‘”Great choice!”, code+ ” is one of our best sellers here.”) print(“”) elif (code == ‘A3’): product = “[A3] Funfetti with Sprinkle Frosting” price = 210 print(‘ ‘”Great choice!”, code+ ” is one of our best sellers here.”) print(“”) elif code == ‘A4’: product = “[A4] Mocha Cupcake with Espresso Frosting” price = 240 print(‘ ‘”Great choice!”, code+ ” is one of our best sellers here.”) print(“”) elif code == ‘A5’: product = “[A5] Pumpkin Spice Latte Cupcake” price = 260 print(‘ ‘”Great choice!”, code+ ” is one of our best sellers here.”) print(“”) #Drinks elif (code == ‘B1’): product = “[B1] Espresso” size = input(‘ ‘”May I know what size of B1? (Small/Medium/Large): “) print(“”) elif (code == ‘B2’): product = “[B2] Iced Coffee” size = input(‘ ‘”May I know what size of B2? (Small/Medium/Large): “) print(“”) elif (code == ‘B3’): product = “[B3] Latte” size = input(‘ ‘”May I know what size of B3? (Small/Medium/Large): “) print(“”) elif (code == ‘B4’): product = “[B4] Strawberry Milkshake” size = input(‘ ‘”May I know what size of B4? (Small/Medium/Large): “) print(“”) elif (code == ‘B5’): product = “[B5] Chocolate Milkshake” size = input(‘ ‘”May I know what size of B5? (Small/Medium/Large): “) print(“”) else: print(‘ ‘”Invalid code.”, code+ ” is not available in our product.”) print(“”) if(product != “”): if(size != “”): if(size == ‘Small’): price = 90 elif(size == ‘Medium’): price = 120 elif(size == ‘Large’): price = 150 quantity = int(input(‘ ‘f”May I ask how many of {code} you’d like to order?: “)) print(“”) #Part of the program that tells you the total Order Summary print(” ——————————————————————————————“) print(“”) print(‘ ‘”You ordered: ” + str(quantity) + ” of ” + product + ” ” + size) print(“”) print(” ——————————————————————————————“) print(“”) total = float(price * quantity) print(‘ ‘”Total Amount to pay: P” + str(“{:.2f}”.format(total))) print(“”) print(” ——————————————————————————————“) print(“”) #Payment Section of the program payment = 0 payment = int(input(‘ ‘”Please enter payment amount: P”)) print(“”) while payment < total: print(' '"Your payment is not enough. Please pay P" + str("{:.2f}".format(total))) print("") payment = int(input(' '"Please enter payment amount: P")) print("") print(" ------------------------------------------------------------------------------------------") print("") print(' '"I received P" + str("{:.2f}".format(payment))) print("") print(' '"Your change is P" + str("{:.2f}".format(payment-total))) print("") print(" ------------------------------------------------------------------------------------------") print("") print(' '"********** THANK YOU! **********") print("") print(" ------------------------------------------------------------------------------------------") print("") #Repeat to the top (Main) repeat = input(' '"Perhaps, would you like to order once again? (Yes/No): ") if (repeat == 'Yes'): main() print("") print(" ------------------------------------------------------------------------------------------") print("") else: print("") print(' '"Comeback to us again next time. Have a nice day, Ma'am/Sir!") print("") exit()main() Computer Science Engineering & Technology Python Programming Share QuestionEmailCopy link Comments (0)


