Answered step by step
Verified Expert Solution
Question
1 Approved Answer
? * * Problem Pizza * * IN Python In this poblem we will consider that we are building the simplified background programming logic necessary
Problem Pizza IN Python
In this poblem we will consider that we are building the simplified background programming logic necessary to take an order for a pizza.
First, we should welcome our customer. Thus, create simple print statement to welcome the customer to your pizza shop. Thus, come up with a fun name
for your shop. "Welcome to Crusty's Pizzal"
Then, we begin by taking the order. Create a print statement telling the user to build their pizza, "Let's Build you a pi The first prompt should be to ask the
user for the style of crust they would like on their pizza. Store the crust types in the CRUSTS lists, there are four types of crust Hand Tossed, Pan, Thin,
and Crispy. Using a for loop print out the options to the customer. Then obtain their selection. Store their input in CRUSTSELECTION variable. It should
look like this: Begin by choosing a crust. We have to following available:
A Hand Tossed
B Pan
C Thin
D Crispy
What type of crust would you like? Enter or :
If the user selected then Pan pizza was selected, you should confirm the selection by creating one more print statement that states their selection back
at them. "You selected Pan crust good choice!"
Next we need to do something similar to gather the pizza size. We serve and pizzas, Store these size options in a SIZES list. Then use a for
loop to again give the customer the options. Use fstrings to print out the information. Then again collect input from the customer and storing that selection
in SIZESELECTION variable. Lastly, verify the customer's selection through a simple print statment. Assure that the process is the same as in part
Next, you will prompt the user regarding how many toppings they would like. The goal is to prompt the user for the number of toppings they will want of
their pizza. Store and convert this variable to integer as the variable NUMTOPPINGS. Create an empty list called REQTOPPINGS as in requested
toppings. Using a for loop, range, and append functions add the requested toppings to the REQTOPPINGS list. Read the parts below to make this
happen.
a Prior to gathering the input from the user regarding which specific toppings they would like. It is important to create a list of currently available toppings
for pizzas at the restaurant. The following are the currently available toppings at our pizza restaurant. Store the following into a lists called
AVAILABLEMEATTOPPINGS and AVAILABLEVEGTOPPINGS: The current meat toppings available are sausage, pepperoni, ham, and bacon. For
the available vegetable options there is currently available: onions, jalapenos, black olives, green peppers, green chile, mushrooms, and green olives. b
run a for loop to fill the required toppings based on the question of how many topping the user would you like. Checking each submission is either in our
available lists or not. If the topping is available, state to the user using a print statement: We have added black olives to your pizza" for example.
However, if the topping entered is not on the lists then state to the user using a print statement, "Sorry we are out of pineapple at the moment. If not
available then do not add anything append anything to the required toppings list. In addition, if the topping is available then append the topping to the
required toppings list, REQTOPPINGS. NOTE: This will require one if statement and one else. That is it
Now to finalize the order. First, you need to asses the subtotal cost of the pizza, determine the taxes, and the grand total of the pizza. Create a variables
SUBTOTAL, TOTAL, and TAXES. The first thing to determine is the based prices. The price should be initialized to dollars. Then create if elif else chains
to determine the cost of the pizza based on the following information. You will need all the varaibles above and the REQTOPPINGS list to determine the
cost This can be done with a sequence of if elif, and else statements as well as a for loop to loop through required toppings list.
A The base price based on size pizza is dollars, is dollars, and is dollars.
B If the crust is Hand Tossed then dollars should be added to the subtotal.
C All meat toppings add dollars to the base price
D All vegetable toppings should add to the base price.
E Determine the taxes at of the subtotal
F Determine the Total receipt
Finally print out the summary of the order. For example,
You ordered
Hand Tossed pizza
with toppings
black olives
pepperoni
mushrooms
Subtotalxxxx
Taxestttt
TotalTTTT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started