The whole assignment
Bentley University Fall 2021 CS 230 Introduction to Programming with Python homework 2: Pizza Hour! In this assignment you are going to write a program to help customers select the right pizza. The program will allow them to customize a pizza that will meet their needs. Customers will select their preferred size, kind, and crust. The program should be able to handle incorrect inputs and continue when the input is correct. The base prices for the pizzas and the additional costs for options are: Pizza Size Choices Name Price Small (S) $10.00 Medium (M) $12.00 Large (L) $15.00 Pizza Options Name Price Meat Pizza (M) +$2.00 Veggie Pizza (V) +$0.00 Supreme Pizza (S) +$4.00 Crust Options Name Price Original (O) +$0.00 Hand Tossed (H) +$1.00 Crispy (C) +$1.50 Stuffed Crust (S) +$3.00 Rules For each pizza, the customer can select one size from Small (S), Medium (M), and Large (L). Then select one pizza type from Meat pizza (M), Veggie pizza (S), and Supreme (S) pizza. For each pizza, customer can select one crust type from following options Pizza Crust Meat pizza Original (O) Stuffed Crust (S) Veggie pizza Original (O) Crispy (C) Supreme pizza Original (O) Hand Tossed (H) Stuffed Crust (S) Requirements Write a program that starts by asking the customer size preference followed by the pizza type. After that, depending on the type of pizza, i.e., meat, veggie, or supreme, they will be asked for the crust. All inputs options can be either capital or lower cases. For example, for the small size, “S” and “s” should both be accepted. If the inputs are not the ones listed in the menu, ask the customer to re-enter, until the input is correct. After all the selections are made, the output with the options selected and the pricing will be displayed in a formatted table. Input and Output First, ask to enter the size of the pizza: Next, ask for the pizza type and display the choice: Then, ask for the crust option: Finally, display a report summarizing the pizza details with the customer's chosen options. Center the title in a field of 50 characters, with a line of 50 *'s above, a line of 50 ='s below the options, and then the total price at the bottom. For each option, list the option name followed by its price and the price of the option. Format all output so you create a nicely justified report as shown below. The program should also calculate the price of the final sale. See the end of the assignment for several sample interactions, especially how incorrect inputs are handled. Formatting Guidelines and Requirements · Accept both upper- and lower-case letters for each menu option. · Be sure that your report matches the format of the sample report shown with columns, tabs, and justified vales. Format all prices with two decimal places and dollar signs. · Use symbolic constants for the prices of each option. · Make use of a Boolean variable in your program. · Use Python's f-strings (format strings) to format your work to receive full credit. · Be sure to ask the customers to re-enter their choices if they have incorrect inputs. · Include a docstring comment at the beginning of your program with the program/file name, your name, date, and a short description of the program, and the statement certifying you completed this work individually. Rubric # Criteria Points 1 Code has appropriate docstring, documentation, meaningful variable names, constants, and displays good programming practice 5 2 Program performs calculations and assignments correctly 15 3 Handle the incorrect inputs appropriately 10 4 Logic for making the appropriate selections based on the type of pizza selected 10 5 Output is correctly spaced and formatted according to the specifications above 10 Total 50 Your program must run without syntax errors to receive full or partial credit. If a part of your program is working, you will receive partial credit, but only if the program initially runs without syntax errors. Your grade will be zero on this assignment if it contains any syntax errors. Name your Python file: hw2_shortname.py . Submit it on Blackboard by the due date. Grading This assignment will be worth 50 points as described above. When calculating your course grade, the 50 points on this assignment will be scaled so that this assignment contributes six (6) percent to your overall course grade. Sample User Interaction Sample Run 1 Sample Run #2 Sample Run #3 Handle incorrect inputs Sample Run #4 Keep asking until the input is correct