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
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
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7f1aa3d2-c193-4645-89eb-08d86bef2195%2F1ea9b4a1-42c2-4cd0-ab81-2bdd921e3840%2Fmrrl4mr_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)