thecodezone.
The Code Zone
Short steps, at your pace · Free lessons and practice · Member video walkthroughs
Save your next small win.

Checking your account…

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

All courses

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.

More options

Your lesson progress

Read the workshop brief: not startedPizza order workshop: not started

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.

Rob orders three pizzas, adds $36 for pizzas, $4 delivery and an $8 tip, then splits the $48 total between four friends for $12 each.
Rob’s comic strip · Python basics challenges

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

ONE STEP FORWARD