Skip to content
IT Vizag
← Python Basics

▶ Sign up free for the video, slides & prompts

The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.

Checking…

Mini project: tip and bill calculator

Lesson 10 of 10 · 2 min read

Put it all together in a small program you can show off.

🎬 Video version coming soon — read it now

Time to put everything together: print, variables, maths, strings, f-strings and input. You'll build a small restaurant bill calculator that you could actually use.

What it does

  1. Asks for the bill amount, the tip percentage and the number of people
  2. Adds 5% GST and the tip
  3. Prints a neat receipt with each person's share

The code

🔒 Code example: sign up free (above) to unlock it.

:>9.2f means "two decimal places, right-aligned in 9 characters", so the rupee amounts line up like a real receipt.

Try it

Run it with a bill of 2400, a 10% tip and 3 people. You should see a total of ₹2,760.00 and a share of ₹920.00.

Make it yours: challenges

  1. Round each share up to the nearest rupee. Hint: import math and math.ceil().
  2. Ask for the restaurant name and print it at the top of the receipt.
  3. Show how much the tip adds per person.
  4. Ask an AI tutor to review your finished code, and decide for yourself which suggestions to keep.

What you learned in this course

  • What programming is, and how to run Python in Colab
  • print, comments, variables, ints, floats and strings
  • f-strings, input() and converting types
  • Reading errors calmly, and using AI as a tutor rather than a crutch

Next course: Decisions & Loops. You'll teach your programs to make choices and repeat work, and build a number-guessing game.

Tip: Save this project to GitHub or share a screenshot on LinkedIn with #ITVizag. A small finished project is worth more than a big unfinished one.

In one line

You can now write a useful interactive program; next, you'll make it choose and repeat.

Saved on this device. Sign in to keep progress everywhere.

Share with a friend