Skip to project content
BrounStack
PROJECT 03 · PYTHON

Build a progress utility.

Create a small command-line tool that calculates completion percentage, validates user input and prints a useful status message. It is simple enough to understand and practical enough to feel real.

Level: Beginner Time: 35–50 min Focus: Functions + Logic
def calculate_progress(done, total):
  return round((done / total) * 100)

progress = calculate_progress(7, 10)
print(f"Progress: {progress}%")
> Progress: 70%

What you will build

A reusable Python utility that turns two numbers into a clear progress result and safely handles common input mistakes.

  • Read completed and total values from the user.
  • Calculate progress inside a reusable function.
  • Validate zero, negative and over-limit values.
  • Print percentage plus a simple progress message.

Build it step by step

Keep the calculation separate from input/output so the function stays easy to reuse and test.

Create the functionAccept done and total values and return a percentage.
Validate valuesReject totals below 1 and clamp completed work to the allowed range.
Read user inputConvert input text to integers and handle invalid values.
Show useful outputPrint percentage and a message for starting, in-progress or complete.
Starter projectPython · ready for BrounStack runner
\n