🐍 Python for kids · Class 5 · Lesson 6 of 18 · Free
First Mini Projects
⏱ About 35 minutes · ▶ run real Python here — nothing to install · no sign-in
In this lesson you will
- Plan a program as input, process and output
- Combine input(), maths and f-strings in one program
- Change a project and make it your own
You now know five big ideas: print(), variables, maths, input() and strings. Alone, each one is a tool. Together, they build real programs. Today you are the programmer, and you will build five small apps.
How do I plan a mini project?
Every program on this page follows the same three steps. Programmers call them input, process and output.
Input means asking the user for values. Process means doing the maths or changing the text. Output means showing a neat answer.
Before you type, say the three steps aloud. A clear plan makes the code easy to write.
💡 Each project below has an Inputs box with sample answers. Change them and press Run to test your app.
Project 1: How do I build a canteen bill calculator?
The canteen uncle needs a quick bill. The program asks for the snack, its price and the quantity.
It multiplies to get the total. Then it works out the change from the note the student gives.
Notice how each step gets its own variable with a clear name.
▶snack = input("Snack name: ")2price = int(input("Price of one: "))3qty = int(input("How many? "))4paid = int(input("Money given: "))5total = price * qty6change = paid - total7print(f"{qty} x {snack} = {total} rupees")8print(f"Your change: {change} rupees")
No variables yet.
▌✏️ Change this code and run it yourself
Snack name: vada pav Price of one: 15 How many? 3 Money given: 50 3 x vada pav = 45 rupees Your change: 5 rupees
Project 2: How do I convert Celsius to Fahrenheit?
Weather reports in India use Celsius. Some countries use Fahrenheit instead.
The formula is: multiply by 9, divide by 5, then add 32. Python follows BODMAS, so this works in one line.
We use float() because temperatures can have decimals, like 36.6.
Temperature in Celsius: 35 35.0 C is 95.0 F
💡 Try 37. That is normal body temperature, and it should give 98.6 F.
Project 3: How do I make a funny story maker?
This game asks for words without telling the story. Then it drops them into a sentence.
The surprise makes the story funny. It is all done with input() and one f-string.
strip() and lower() keep the words tidy, even if the user types capitals or spaces.
An animal: Monkey A food: jalebi A place: Juhu Beach One day a monkey walked into Juhu Beach. It ate ten plates of jalebi and fell asleep!
Project 4: How do I share sweets fairly?
Your aunt brings a box of sweets for the whole class. How many does each child get?
// gives the share for each child. % gives the sweets that are left over for the teacher.
The last line checks the maths: shares plus leftovers must equal the whole box.
▶sweets = int(input("Sweets in the box: "))2children = int(input("Children in class: "))3each = sweets // children4left = sweets % children5print(f"Each child gets {each} sweets.")6print(f"{left} sweets are left for the teacher.")7print(f"Check: {each * children + left} sweets in all")
No variables yet.
▌✏️ Change this code and run it yourself
Sweets in the box: 100 Children in class: 32 Each child gets 3 sweets. 4 sweets are left for the teacher. Check: 100 sweets in all
Project 5: How do I make a secret code name?
Spies have code names, so why not you? The program uses slicing to mix your name and city.
It takes the first three letters of your name and the last two letters of your city. Then it adds your lucky number times 7.
upper() makes the code name look official. Try it with your own details!
▶name = input("Your first name: ").strip()2city = input("Your city: ").strip()3lucky = int(input("Lucky number: "))4code = f"{name[:3]}{city[-2:]}{lucky * 7}"5print(f"Agent {name}, your code name is {code.upper()}")6print(f"It has {len(code)} characters.")
No variables yet.
▌✏️ Change this code and run it yourself
Your first name: Ishaan Your city: Pune Lucky number: 8 Agent Ishaan, your code name is ISHNE56 It has 7 characters.
💡 The f-string glues the two slices and the number together. + alone cannot join text and a number.
🤔 Predict the output
Think like Python: read the code and choose what it prints. You get the reason straight away.
Question 1. What does this print?
c = 30 f = c * 9 / 5 + 32 print(f)
Question 2. What does this print?
name = "aarav" print(name[0].upper() + name[1:])
Question 3. What does this print?
price = 45
qty = 3
print(f"Total: {price * qty}")🧩 Your challenge
Build a report card. Ask for the student's name and marks in three subjects (each out of 100). Print the total and the percentage with f-strings.
Student name: Diya Maths marks: 85 Science marks: 92 English marks: 78 ====================== Report card: DIYA Total: 255 out of 300 Percentage: 85.0
⚠️ Common mistakes (and how to fix them)
❌ Wrong
m1 = input("Maths: ")
m2 = input("Science: ")
print(f"Total: {m1 + m2}")No error – but 85 and 90 give a total of 8590.
✅ Right
m1 = int(input("Maths: "))
m2 = int(input("Science: "))
print(f"Total: {m1 + m2}")input() gives text, and + joins text. Convert both answers with int() before adding.
❌ Wrong
print(f"Your bill is {total}")
total = 20 * 3NameError: name 'total' is not defined
✅ Right
total = 20 * 3
print(f"Your bill is {total}")Python runs from top to bottom. Create a variable before you use it.
❌ Wrong
celsius = 100 fahrenheit = celsius * 9 / (5 + 32) print(fahrenheit)
No error – but 100 C gives about 24.3 F instead of 212.0 F.
✅ Right
celsius = 100 fahrenheit = celsius * 9 / 5 + 32 print(fahrenheit)
The brackets made Python add 5 + 32 first. Only use brackets where the formula needs them.
📌 Remember
- Plan every program as input, process and output.
- Use int() for counts and float() for values with decimals.
- Store each step in a variable with a clear name.
- f-strings turn your answers into neat, readable sentences.
- // and % share things fairly; slicing and upper() play with text.
- Test your project with different inputs to make sure it always works.
Finished the quiz and the challenge?
Questions students ask
What are good first Python projects for kids?
Start with small programs that ask questions and calculate: a bill calculator, a temperature converter, a story maker or a report card. Each one uses input(), maths and print().
How do I make my Python project better?
Add one new idea at a time. Ask an extra question, add a border with "*" * 20, or tidy the text with strip() and upper().
Why does my program show 8590 instead of 175?
You added two answers from input() without converting them. input() gives text, so + joins them. Wrap each input() in int().
What comes after these mini projects?
Next you will learn if statements. They let a program make decisions, like printing "Pass" or "Try again" based on the marks.