PYTHON CODE WRITE SHORT DESCRIPTION OF DESIGN OF THE CODE 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

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 2.7CP
icon
Related questions
Question

PYTHON CODE

WRITE SHORT DESCRIPTION OF DESIGN OF THE CODE

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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning