Create Task Practice

Write a simple program to practice for the AP Create Task.

This program will simulate a pizza ordering system. The user can select what size pizza and any number of toppings, and the output is the total price of the pizza.

The basic flow of the program is as follows:

  1. Ask the user what size pizza they want.
  2. Allow them to choose any number of toppings.
  3. Calculate the total price of the pizza.

Don’t forget to disallow invalid inputs.

Use the following values for pizza prices:

Size Price
Small $10.99
Medium $12.99
Large $14.99

Each topping costs $1.50.

Here’s an example of the program being run:

$ python3 pizza.py
Welcome to the Pizza Ordering System!
Available sizes: small, medium, large
What size pizza would you like? small

Available toppings:
1. pepperoni
2. mushrooms
3. onions
4. sausage
5. bacon
6. extra cheese
7. green peppers
8. olives

Enter a topping number (or 'done' to finish): 1
Added pepperoni

Enter a topping number (or 'done' to finish): done

Order Summary:
Size: small
Toppings: pepperoni
Total Price: $12.49

Once you have completed the assignment, write brief answers to the following potential FRQ questions:

Submit your answers in a Google Doc to the Schoology assignment.