04.03 · Python basics challenges / Learn · 25 min
Python Pizza Order Workshop
Three pizzas, delivery and a tip: calculate the total and split the order equally between four friends.
Activity 3 of 3 in Python basics challenges
Python Basics / 04.03
Pizza order workshop
Not started
Build a pizza-order calculator with variables, arithmetic, rounding and a formatted receipt in ten guided steps.
Your lesson progress
Empty: not started. Yellow: in progress. Green: complete. Marking the whole activity complete does not replace your test results. These circles save in this browser for this pilot.

Build a useful program from a blank file
Use the Python skills you have practiced to build one complete calculator. You will name the inputs, calculate the pizza cost, add delivery and a percentage tip, divide the total, then print a readable receipt. You will not need loops, lists or custom function definitions.
Our order is three $12 pizzas, $4 delivery and a 20% tip on the subtotal. Four friends share the $48 total equally. This is an original Code Zone workshop inspired by the arithmetic practice in freeCodeCamp’s Bill Splitter, with its own scenario, instructions and checks.
What you will practice
Each step gives an exact task and checks your own code. The editor starts with a comment, not a completed program. Your code carries forward, hints are available, and explained solutions unlock after a pass or three failed checks. Signed-in work saves to your account; signed-out work stays on this browser.
The final receipt should show Code & Pizza, Total: $48.00 and Each friend pays: $12.00. Rounding a numeric value and formatting it for display are separate operations. We introduce each before asking you to use it.
After you finish
Explain why delivery is added before the tip in this workshop and why the final total is divided by four. The chosen tip rule applies to this exercise, not every restaurant order.
For a personal experiment after completing the checkpoints, change the number of friends or the pizza price and predict the new result before running it. The checkpoint tests intentionally use the original order values.
This is introductory arithmetic practice, not a production payment system. Real bills need an agreed way to distribute leftover cents and suitable decimal money calculations.
Build it one step at a time
Prefer learning by typing? Work through short instructions, run the Python code and check each change before continuing. Your guided project saves separately from the challenge below.
The workshop opens in a new tab. Your own code carries forward; each step has a focused check and an optional hint.
Start workshop(opens in a new tab)10 steps · Saved work · Instant feedback
Ready to try it?
Practice in your browser and see your results.
Progress details
Have a question?
Ask the Code Zone community.
Ask a question in The Code Zone (opens in a new tab)Continue learning

7 days freeTry The Code Zone
THE CODE ZONE COMMUNITY
Your next step is easier together.
Try the community free for 7 days.
No charge during your trial. Choose your plan on Skool.
- Ask questions and get support in the community
- Watch every course video walkthrough
- Find a study buddy in the 24/7 study room
Make the most of your trial with Premium.
Choose Premium on Skool to try Thursday live help sessions. Bring your questions, work through code, and get unstuck together.
Scheduled Thursdays in Eastern Time. Check the Skool calendar for your local date and time.
Have a website account? Sign in