A simple beginner-friendly Python project where users can order pizza by choosing size and toppings. The program calculates the total bill based on the user's choices.
-
The user selects a pizza size:
- S (Small) β $15
- M (Medium) β $20
- L (Large) β $25
-
The user decides whether to add pepperoni:
- +$2 for Small pizzas
- +$3 for Medium or Large pizzas
-
The user chooses whether to add extra cheese:
- +$1 for any size
-
The final bill is displayed.
π Welcome to Python Pizza Deliveries!
What size pizza do you want? S, M or L: M
Do you want pepperoni on your pizza? Y or N: Y
Do you want extra cheese? Y or N: N
β
Your final bill is $23
- Input validation (prevents wrong inputs like typing
Zfor size). - Calculates bill dynamically.
- Beginner-friendly project for learning Python basics (if/else, input, variables).
- Make sure you have Python 3 installed.
- Save the code in a file, e.g.,
pizza.py. - Open your terminal and run:
python pizza.py- Add multiple pizza orders in one run.
- Add more toppings (mushrooms, olives, etc.).
- Allow user to order drinks and sides.
β¨ Have fun customizing your pizza order in Python! π