write python code along with the comments for the below question Papa John, the owner of Papa Johns Pizzeria, needs help in keeping track of the number and types of pizzas he has cooked on a given day and to produce statistics regarding the choices her customers made. Your task is to write a Python application which will contain the following methods.. a main driver, that will: Display a welcome message Prompt Papa John for the maximum number of pizzas he can prepare on that day and create an empty list called todaysPizzasthat will have the potential of keeping track of that many DeluxePizza Display a main menu (fig 1) attached in images with the following choices. If Papa John enters an invalid choice keep prompting him until he enters a valid choice.   When option 1 of the main menu is selected: Prompt user for the password. (Make sure you have a constant variable containing the password “deluxepizza” - don’t use any other password. John has 3 tries to enter the correct password. You know with greasy hands is not always easy to type the correct password on the 1st try. After the 3rd illegal entry, the main menu in figure 1 is displayed again. If the correct password is entered, ask John how many pizzas he wants to enter. Make sure that he is not going over her limit for that day. If he is within the limit then add the pizzas otherwise tell Papa John that he only has enough ingredients to make the number of remaining places in the list and add them. (You decide how to input the information for each pizza added). When option 2 of main menu is selected: Prompt Papa John for his password. (Same as option 1). Again Papa John has 3 tries to enter the correct password. After the 3rd illegal entry, the main menu in figure 1 is displayed. Ask Papa John which pizza number he wishes to update. The pizza number is the index in the list todaysPizzas. If there is no DeluxePizza object at the specified index location display a message on the screen, and ask Papa John if he wishes to enter another pizza number or quit this operation and go back to the main menu. If the pizza number exists, display on the screen all of the current information for that pizza in the following format (same as __str__ plus the price of the pizza):   Pizza  # Pizza size: Cheese filled dough: Number of cheese toppings: Number of pepperoni toppings: Number of mushroom toppings: Number of vegetable toppings: Price: $   Then ask Papa John which attribute he wishes to change by displaying the following menu which is figure 2 attached in images   Once Papa john has entered a correct choice, update the attribute and display again all of the attributes to show that the attribute has been changed. Keep prompting Papa John for additional changes until he enters 7 (Quit). Each time Papa John is prompted for a choice make sure that he enters a number from 1 to 7, otherwise keep prompting him until he enters a valid number.   When option 3 of main menu is selected: prompt the user for the size of the pizza he is interested in and display all information for all pizzas of that size by invoking the method pizzasOfSize() (see specification in step 2 below) as well as the number of pizzas of the requested size produced. Once done display the main menu (fig. 1)attached in images   When option 4 of main menu is selected: display fig 3: attached in images Prompt the user for a choice (making sure it is a valid choice). Perform the necessary action using the methods listed in steps 2 to 7 below when possible, or write the necessary code using the methods of class DeluxePizza. Keep prompting Papa John for choices until he decides to quit, at which point you should display the main menu (fig. 1). When option 5 of the main menu is selected: display a closing message and end the program A separate method in the driver called pizzasOfSize() which needs one argument of type String (the size) and which will display on the screen the pizzas of the requested size. The pizza number in the display should reflect the index of the location of each pizza in the list todaysPizzas.(shown in fig 4) attached     A separate method outside the class called cheaperThan() which will list the number (index) and the price of all pizzas less than the requested   A separate method outside the class called lowestPrice() which will find and return the index of the pizza with the lowest price in the   a separate method outside the class called highestPrice() which will find and return the location of the pizza with the highest price in the list (step f).   a separate method outside the class called numberOPizzasOfSize() which will return the number of pizzas of the specified

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

write python code along with the comments for the below question

Papa John, the owner of Papa Johns Pizzeria, needs help in keeping track of the number and types of pizzas he has cooked on a given day and to produce statistics regarding the choices her customers made. Your task is to write a Python application which will contain the following methods..

  1. a main driver, that will:
    1. Display a welcome message
    2. Prompt Papa John for the maximum number of pizzas he can prepare on that day and create an empty list called todaysPizzasthat will have the potential of keeping track of that many DeluxePizza
    3. Display a main menu (fig 1) attached in images with the following choices. If Papa John enters an invalid choice keep prompting him until he enters a valid choice.

 

When option 1 of the main menu is selected:

  • Prompt user for the password. (Make sure you have a constant variable

containing the password “deluxepizza” - don’t use any other password. John has 3 tries to enter the correct password. You know with greasy hands is not always easy to type the correct password on the 1st try. After the 3rd illegal entry, the main menu in figure 1 is displayed again.

  • If the correct password is entered, ask John how many pizzas he wants to enter. Make sure that he is not going over her limit for that day. If he is within the limit then add the pizzas otherwise tell Papa John that he only has enough ingredients to make the number of remaining places in the list and add them. (You decide how to input the information for each pizza added).

When option 2 of main menu is selected:

  • Prompt Papa John for his password. (Same as option 1). Again Papa John has 3 tries to enter the correct password. After the 3rd illegal entry, the main menu in figure 1 is displayed.
  • Ask Papa John which pizza number he wishes to update. The pizza number is the index in the list todaysPizzas. If there is no DeluxePizza object at the specified index location display a message on the screen, and ask Papa John if he wishes to enter another pizza number or quit this operation and go back to the main menu. If the pizza number exists, display on the screen all of the current information for that pizza in the following format (same as __str__ plus the price of the pizza):

 

Pizza  # Pizza size:

Cheese filled dough: Number of cheese toppings:

Number of pepperoni toppings:

Number of mushroom toppings:

Number of vegetable toppings:

Price: $

 


Then ask Papa John which attribute he wishes to change by displaying the following menu which is figure 2 attached in images

 

Once Papa john has entered a correct choice, update the attribute and display again all of the attributes to show that the attribute has been changed. Keep prompting Papa John for additional changes until he enters 7 (Quit). Each time Papa John is prompted for a choice make sure that he enters a number from 1 to 7, otherwise keep prompting him until he enters a valid number.

 

When option 3 of main menu is selected:

  • prompt the user for the size of the pizza he is interested in and display all information for all pizzas of that size by invoking the method pizzasOfSize() (see specification in step 2 below) as well as the number of pizzas of the requested size produced. Once done display the main menu (fig. 1)attached in images

 

When option 4 of main menu is selected:

  • display fig 3: attached in images

Prompt the user for a choice (making sure it is a valid choice). Perform the necessary action using the methods listed in steps 2 to 7 below when possible, or write the necessary code using the methods of class DeluxePizza. Keep prompting Papa John for choices until he decides to quit, at which point you should display the main menu (fig. 1).

When option 5 of the main menu is selected:

  • display a closing message and end the program
  1. A separate method in the driver called pizzasOfSize() which needs one argument of type String (the size) and which will display on the screen the pizzas of the requested size. The pizza number in the display should reflect the index of the location of each pizza in the list todaysPizzas.(shown in fig 4) attached

 

 

  1. A separate method outside the class called cheaperThan() which will list the number (index) and the price of all pizzas less than the requested

 

  1. A separate method outside the class called lowestPrice() which will find and return the index of the pizza with the lowest price in the

 

  1. a separate method outside the class called highestPrice() which will find and return the location of the pizza with the highest price in the list (step f).

 

a separate method outside the class called numberOPizzasOfSize() which will return the number of pizzas of the specified

File
Tools
View
Document1 - Word
O X
Papa John, what do you want to do?
1. Enter a new pizza order (password required)
2. Change information of a specific order (password required)
3. Display details for all pizzas of a specific size (s/m/1)
4. Statistics on today's pizzas
5. Quit
Please enter your choice >
FIGURE 4
List of size pizzas sold today:
Pizza #
Pizza size:
Cheese filled dough:
Number of cheese toppings:
Number of pepperoni toppings:
Number of mushroom toppings
Number of vegetable toppings:
Price: $price
Fig 1. Main menu
Papa John, what would you like to change?
1. Size
2. Cheese filled or not
3. Number of cheese toppings
4. Number of pepperoni toppings
5. Number of mushroom toppings
6. Number of vegetable toppings
7. Quit
Enter choice >
Fig 2. Update menu
Pizza #
Pizza size:
Cheese filled dough:
Number of cheese toppings:
Number of pepperoni toppings:
Number of mushroom toppings
Number of vegetable toppings:
Price: $price
PIZZA
Papa John, what information would you like?
1. Cost and details of cheapest pizza
2. Cost and details of most costly pizza
3. Number of pizzas sold today
4. Number of pizzas of a specific size
5. Average cost of pizzas
6. Quit
Enter your choice >
.
Our Chef, made xx size pizzas today!
fullscreen
Fig. 3 Statistic menu
fullscreen
End of document I
Screens 9-10 of 10
130%
6:38 PM
P Type here to search
prime
video
4/29/2021
Transcribed Image Text:File Tools View Document1 - Word O X Papa John, what do you want to do? 1. Enter a new pizza order (password required) 2. Change information of a specific order (password required) 3. Display details for all pizzas of a specific size (s/m/1) 4. Statistics on today's pizzas 5. Quit Please enter your choice > FIGURE 4 List of size pizzas sold today: Pizza # Pizza size: Cheese filled dough: Number of cheese toppings: Number of pepperoni toppings: Number of mushroom toppings Number of vegetable toppings: Price: $price Fig 1. Main menu Papa John, what would you like to change? 1. Size 2. Cheese filled or not 3. Number of cheese toppings 4. Number of pepperoni toppings 5. Number of mushroom toppings 6. Number of vegetable toppings 7. Quit Enter choice > Fig 2. Update menu Pizza # Pizza size: Cheese filled dough: Number of cheese toppings: Number of pepperoni toppings: Number of mushroom toppings Number of vegetable toppings: Price: $price PIZZA Papa John, what information would you like? 1. Cost and details of cheapest pizza 2. Cost and details of most costly pizza 3. Number of pizzas sold today 4. Number of pizzas of a specific size 5. Average cost of pizzas 6. Quit Enter your choice > . Our Chef, made xx size pizzas today! fullscreen Fig. 3 Statistic menu fullscreen End of document I Screens 9-10 of 10 130% 6:38 PM P Type here to search prime video 4/29/2021
Expert Solution
steps

Step by step

Solved in 2 steps

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