Question: Week 5 Assignment 2: Programming Assignment Translate the algorithm described in the flowchart and pseudocode created for the Pizza Ordering Program algorithm into a Python

Week 5 Assignment 2: Programming Assignment

Translate the algorithm described in the flowchart and pseudocode created for the Pizza Ordering Program algorithm into a Python program. The requirements of the program are:

  • The program allows the user to select only one pizza size.
  • The program allows user to select any combination of available toppings (or none).
  • The program should display the total cost with two decimal places.
  • The program should display all information in a clear and readable format.

Design a comment header at the top of the file using a block comment and use in-line comments to describe important sections (input, processing, and output) based on intended functionality.

Test your code by compiling it to verify that it is functioning as expected and correct any syntax and/or semantic errors present (based on the programming problem). Make sure to test your code for different combination of inputs: pizza size, number of toppings, quantity. You can use the Python Tutor to visualize execution of your code and debug any errors.

A sample output for the program is shown below.

Welcome to the Manny's Pizza!

Choose what size pizza you'd like to order:

1. Small cheese pizza ($12.00) 2. Medium cheese pizza ($14.00) 3. Large cheese pizza ($16.00)

What size would you like? (1, 2, or 3): 2

Choose your toppings. Toppings cost $1.50 each.

Would you like pepperoni? (1 for yes, 0 for no): 0 Would you like sausage? (1 for yes, 0 for no): 1 Would you like olives? (1 for yes, 0 for no): 1

How many pizzas would you like?: 2

Thank you for your order!

2 Medium cheese pizza with 2 toppings

Your order total is: $34.00

Submit your program as a Python (.py) file and your Test Plan as a PDF or DOC file.

You may design your own Test Plan or use the format shown in the Sample Test Plan. Please note that for Test Plan submission, you only need to submit the "Step 4: Testing" part of the sample provided, you don't need to create the complete document.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!