Program One: Basics • Pizza1.py You do NOT need to use functions or a restart feature. You DO need comments! • This program calculates the total cost of buying a Pizza, and creates an invoice with prices for all the ingredients and the final total. • Your program should ask the user to input the size of the pizza and all the add-ons the user wants. • Include validation and basic exception handling. Accept the appropriate letter response in upper or lower case. • The program must calculate the total price of the pizza based on the size and the add-ons. You will have all the add-on prices in your code since the user does not get to choose what to pay. • Display the output as shown, controlling for the number of decimal places, $ sign and alignment. • Run more than once to test all the pizza options. I will be testing your program! Welcome to Andy's Pizza You can choose the pizza size followed by a list of optional train What size pizza would you like to order? S/M/L are the options: that toppings would you like to add to customize your sizze? Enter a Von & (Yes or No) to the following options: Would you like chees? /Ny Choose from the following cheese cptions: Please enter te for Chedder, P/p for Pepper Jack, S/s for Swisss Would you like protein? V Choose from the following protein options: Please enter / for Chicken. T/t for Tafu. S/s for Shrimpto Would you like stives? /My Would you Live Decors? V Would you like me? Y Here is your aizze onder Small pizza.......$.9.75 Des ......$.5.79 Chick 4.4.75 Dzive...... 1.0.00 Musa... Pizza total.......124.25 Thanks for ordering a pizzal The program must work with a variety of pizza sizes and options. Make sure you display $ and cents! 3

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Program One: Basics
Pizza1.py You do NOT need to use functions or a restart
feature. You DO need comments!
• This program calculates the total cost of buying a Pizza,
and creates an invoice with prices for all the ingredients
and the final total.
• Your program should ask the user to input the size of the
pizza and all the add-ons the user wants.
• Include validation and basic exception handling. Accept
the appropriate letter response in upper or lower case.
• The program must calculate the total price of the pizza
based on the size and the add-ons. You will have all the
add-on prices in your code since the user does not get to
choose what to pay.
• Display the output as shown, controlling for the number
of decimal places, $ sign and alignment.
• Run more than once to test all the pizza options. I will be
testing your program!
Pizza2.py You need to copy Pizza1.py and make the
following changes:
1. Using the MIPO model, rewrite your program so
that a Main() function controls the program
flow, sending and receiving data to and from the
Inputs(), Processing(), and Outputs() functions.
Inputs() should ask the user for the required
data, and ensure it is valid.
2.
3. Processing() should take the input data and
perform the necessary calculations.
4. Output() should input and calculated data and
format it all as in Pizza1.
5. The program should have a restart at the end of
Main().
Welcome to Andy's Pizza
You can choose the pizza size followed by a list of optional toppings
That size pizza would you like to ander? S/M/L are the options:
that toppings would you like to add to customize your sizza?
Entara Var (Yes or No) to the following options:
Would you like chees? /Ny
6.
From the user view, the program should appear
to run just like Pizza1.
Choose from the following cheese option:
Please enter the for Chedder, P/p for Pepper Jack, S/s for Swisss
Would you like preten? /
Choose from the following protein options:
Please enter / for Chicken, T/t for Tafu, Sfs for Shrimpto
Would you like slives? /My
Would you live peppers? V
Would you 11 m/
Here is your aizze onder
Small pizza.......$.9.75
Selashes.....
Program Two: using MIPO
Chicka....
OLIVE...
4.4.
Pusha..
Pizza total......124.25
Thanks for ordering a pizza!
The program must work with a variety of pizza
sizes and options.
Make sure you display $ and cents!
Final Grading Rubric
1. Comments: programs have long comment/ doc string*** at top
and # short comments throughout. Long comment includes author,
date, and description. Short comments explain functions and
important code lines.
2. Writing/formatting: programs have informative names for
variables, functions, etc. plus high quality user-facing messages,
correct spelling, capitalization & formatting of output.
3. Programs run & use required design features: For example:
mipo_ex model has multiple functions passing data to each other,
validation/correction of input, generic exception handling & restart
feature.
4. Use of best tools: programs include appropriate data types,
expressions, conditional logic, loops, functions & methods.
Transcribed Image Text:Program One: Basics Pizza1.py You do NOT need to use functions or a restart feature. You DO need comments! • This program calculates the total cost of buying a Pizza, and creates an invoice with prices for all the ingredients and the final total. • Your program should ask the user to input the size of the pizza and all the add-ons the user wants. • Include validation and basic exception handling. Accept the appropriate letter response in upper or lower case. • The program must calculate the total price of the pizza based on the size and the add-ons. You will have all the add-on prices in your code since the user does not get to choose what to pay. • Display the output as shown, controlling for the number of decimal places, $ sign and alignment. • Run more than once to test all the pizza options. I will be testing your program! Pizza2.py You need to copy Pizza1.py and make the following changes: 1. Using the MIPO model, rewrite your program so that a Main() function controls the program flow, sending and receiving data to and from the Inputs(), Processing(), and Outputs() functions. Inputs() should ask the user for the required data, and ensure it is valid. 2. 3. Processing() should take the input data and perform the necessary calculations. 4. Output() should input and calculated data and format it all as in Pizza1. 5. The program should have a restart at the end of Main(). Welcome to Andy's Pizza You can choose the pizza size followed by a list of optional toppings That size pizza would you like to ander? S/M/L are the options: that toppings would you like to add to customize your sizza? Entara Var (Yes or No) to the following options: Would you like chees? /Ny 6. From the user view, the program should appear to run just like Pizza1. Choose from the following cheese option: Please enter the for Chedder, P/p for Pepper Jack, S/s for Swisss Would you like preten? / Choose from the following protein options: Please enter / for Chicken, T/t for Tafu, Sfs for Shrimpto Would you like slives? /My Would you live peppers? V Would you 11 m/ Here is your aizze onder Small pizza.......$.9.75 Selashes..... Program Two: using MIPO Chicka.... OLIVE... 4.4. Pusha.. Pizza total......124.25 Thanks for ordering a pizza! The program must work with a variety of pizza sizes and options. Make sure you display $ and cents! Final Grading Rubric 1. Comments: programs have long comment/ doc string*** at top and # short comments throughout. Long comment includes author, date, and description. Short comments explain functions and important code lines. 2. Writing/formatting: programs have informative names for variables, functions, etc. plus high quality user-facing messages, correct spelling, capitalization & formatting of output. 3. Programs run & use required design features: For example: mipo_ex model has multiple functions passing data to each other, validation/correction of input, generic exception handling & restart feature. 4. Use of best tools: programs include appropriate data types, expressions, conditional logic, loops, functions & methods.
Program Three: Lists and Dictionaries
Pizza3.py You need to copy Pizza2.py and make
the following changes:
2.
1. Ask how many pizzas are being purchased.
Use a loop to ask for the size and options of
each pizza. These will be put into a list or a
dictionary.
3.
Your Outputs() should read from the list or
dictionary and format the output as shown
below.
↓
Pizza3
Welcome to Andy's Pizza3 Menu Program
How many pizzas would you like to order? 2
You can choose the pizza size followed by a list of optional toppings
#1 What size pizza would you like to order? S/M/L are the options:m
What toppings would you like to add to customize your pizza?
Enter a Y or N (Yes or No) to the following options:
Would you like cheese? Y/Ny
Choose from the following cheese options:
Please enter C/c for Cheddar, P/p for Pepper Jack, S/s for Swiss:p
Would you like protein? Y/Ny
Choose from the following protein options:
Please enter C/c for Chicken, T/t for Tofu, S/s for Shrimp:c
Would you like olives? Y/Ny
Would you like peppers? Y/Nn
Would you like mushrooms? Y/Ny
#2 What size pizza would you like to order? S/M/L are the options:L
What toppings would you like to add to customize your pizza?
Enter a Y or N (Yes or No) to the following options:
Would you like cheese? Y/Ny
Choose from the following cheese options:
Please enter C/c for Cheddar, P/p for Pepper Jack, S/s for Swiss:S
Would you like protein? Y/Ny
Choose from the following protein options:
Please enter C/c for Chicken, T/t for Tofu, S/s for Shrimp:T
Would you like olives? Y/Nn
Would you like peppers? Y/Ny
Would you like mushrooms? Y/Nn
You can leave
out the zero
options if you
prefer
Here is your pizza order
#1
Medium pizza......$11.75
Pepper Jack......
Chicken...
Olives..........
Peppers..
Mushrooms...
.$.3.75
$.4.75
.$.2.50
.$.0.00
.$.1.50
Pizza total............$24.25
#2
Large pizza..........$13.75
Swiss cheese........$.5.75
Tofu....
..$.3.75
Olives...
.$.0.00
Peppers....
.$.3.50
Mushrooms.... .$.0.00
Pizza total...... .$26.75
Grand total for 2 pizzas: $ 51.00
Thanks for ordering pizza!
Transcribed Image Text:Program Three: Lists and Dictionaries Pizza3.py You need to copy Pizza2.py and make the following changes: 2. 1. Ask how many pizzas are being purchased. Use a loop to ask for the size and options of each pizza. These will be put into a list or a dictionary. 3. Your Outputs() should read from the list or dictionary and format the output as shown below. ↓ Pizza3 Welcome to Andy's Pizza3 Menu Program How many pizzas would you like to order? 2 You can choose the pizza size followed by a list of optional toppings #1 What size pizza would you like to order? S/M/L are the options:m What toppings would you like to add to customize your pizza? Enter a Y or N (Yes or No) to the following options: Would you like cheese? Y/Ny Choose from the following cheese options: Please enter C/c for Cheddar, P/p for Pepper Jack, S/s for Swiss:p Would you like protein? Y/Ny Choose from the following protein options: Please enter C/c for Chicken, T/t for Tofu, S/s for Shrimp:c Would you like olives? Y/Ny Would you like peppers? Y/Nn Would you like mushrooms? Y/Ny #2 What size pizza would you like to order? S/M/L are the options:L What toppings would you like to add to customize your pizza? Enter a Y or N (Yes or No) to the following options: Would you like cheese? Y/Ny Choose from the following cheese options: Please enter C/c for Cheddar, P/p for Pepper Jack, S/s for Swiss:S Would you like protein? Y/Ny Choose from the following protein options: Please enter C/c for Chicken, T/t for Tofu, S/s for Shrimp:T Would you like olives? Y/Nn Would you like peppers? Y/Ny Would you like mushrooms? Y/Nn You can leave out the zero options if you prefer Here is your pizza order #1 Medium pizza......$11.75 Pepper Jack...... Chicken... Olives.......... Peppers.. Mushrooms... .$.3.75 $.4.75 .$.2.50 .$.0.00 .$.1.50 Pizza total............$24.25 #2 Large pizza..........$13.75 Swiss cheese........$.5.75 Tofu.... ..$.3.75 Olives... .$.0.00 Peppers.... .$.3.50 Mushrooms.... .$.0.00 Pizza total...... .$26.75 Grand total for 2 pizzas: $ 51.00 Thanks for ordering pizza!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY