Answered step by step
Verified Expert Solution
Link Copied!

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 CRUST_SELECTION 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 1,2,3, or 4 :
If the user selected 2 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 8-,12'' and 20-1 pizzas, Store these size options in a SIZES list. Then use a for
loop to again give the customer the options. Use f-strings to print out the information. Then again collect input from the customer and storing that selection
in SIZE_SELECTION variable. Lastly, verify the customer's selection through a simple print statment. Assure that the process is the same as in part 2.
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 NUM_TOPPINGS. Create an empty list called REQ_TOPPINGS as in requested
toppings. Using a for loop, range, and append functions add the requested toppings to the REQ_TOPPINGS 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
AVAILABLE_MEAT_TOPPINGS and AVAILABLE_VEG_TOPPINGS: 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, REQ_TOPPINGS. 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 0 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 REQ_TOPPINGS 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 8'' pizza is 10 dollars, 12'' is 12 dollars, and 20'' is 24 dollars.
B. If the crust is Hand Tossed then 2.12 dollars should be added to the subtotal.
C. All meat toppings add 1.23 dollars to the base price
D. All vegetable toppings should add 0.75 to the base price.
E. Determine the taxes at 8.15% of the subtotal
F. Determine the Total receipt
Finally print out the summary of the order. For example,
You ordered
8" Hand Tossed pizza
with toppings
black olives
pepperoni
mushrooms
Subtotal----xx.xx
Taxes--...-.-tt.tt
Total-_-..-TT.TT
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

How is wireless access changing e-marketing?

Answered: 1 week ago