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
Step by step
Solved in 2 steps