Welcome back to our beginner-friendly Python series! If you’ve already learned about variables and data types, congratulations — you’re ready to start creating real, useful programs with just that knowledge.
In this hands-on mini project, we’ll be building a Student Report Card Generator using only what you’ve learned so far: Python variables, numbers, strings, and print() statements.
No need to worry about user input, loops, or lists just yet. We’ll work with static values and build confidence in the foundational concepts — step by step, line by line. Let’s code together!
What Are We Building?
Our goal is to build a simple report card that includes:
- Student’s name and class
- Scores in five subjects
- Total score
- Average score
- A clean printed report layout
All this will be done using Python variables, just like boxes where we store different kinds of data — such as names (strings) and marks (numbers).
Step-by-Step Coding Guide
1. Define Student Info
First, we’ll start with some basic student details like name and class. These are stored as string variables.
student_name = "Subtel"
student_class = "JSS 2"
This is where you can personalize your report card. Want it to show your own name or class? Just replace the values in the quotes!
2. Assign Subject Scores
Now, let’s store the marks the student scored in different subjects. We’ll use integer variables since these are whole numbers.
math = 85
english = 78
science = 92
history = 74
computer = 88
Feel free to modify the scores or even add new subjects later. At this stage, each variable holds a number.
3. Calculate Total and Average
Once we have all the subject scores, we’ll calculate:
- Total score: By summing all the subject marks
- Average score: By dividing the total by number of subjects (5)
total_score = math + english + science + history + computer
average_score = total_score / 5
We’re introducing a little math here — nothing advanced. Just basic addition and division, using variables you’ve already defined.
4. Display the Report
Now let’s make it look good. Using a few `print()` statements, we can display the data in a neat and organized layout.
print("STUDENT REPORT CARD")
print("--------------------")
print("Name:", student_name)
print("Class:", student_class)
print()
print("Subjects and Scores:")
print("Math:", math)
print("English:", english)
print("Science:", science)
print("History:", history)
print("Computer:", computer)
print()
print("Total Score:", total_score)
print("Average Score:", average_score)
This will output a complete summary of the student’s academic performance. The line breaks (empty print()
lines) add space for readability.
Complete Code (All Together)
Here’s the entire program, ready for you to copy, run, and experiment with:
# Student Info
student_name = "Subtel"
student_class = "JSS 2"
# Subject Scores
math = 85
english = 78
science = 92
history = 74
computer = 88
# Calculations
total_score = math + english + science + history + computer
average_score = total_score / 5
# Display Report Card
print("STUDENT REPORT CARD")
print("--------------------")
print("Name:", student_name)
print("Class:", student_class)
print()
print("Subjects and Scores:")
print("Math:", math)
print("English:", english)
print("Science:", science)
print("History:", history)
print("Computer:", computer)
print()
print("Total Score:", total_score)
print("Average Score:", average_score)
Try This On Your Own
You’ve got the basic structure down. Now challenge yourself:
- Change the student’s name and class
- Use your own subject names and marks
- Add more subjects like Art, Music, etc.
- Round off the average using:
round(average_score, 2)
Recap: What You Learned
This mini project helped you:
- Use string and numeric variables
- Do basic math with variables
- Format text output using
print()
- Build a real, usable Python script
And all of this was done using just what you’ve already learned — no advanced syntax, no external libraries.
Continue Your Journey
⬅️ Previous Mini Project: Simple Budget Tracker Using Variables
Use variables to build a personalized daily planner — no input, no loops, just creativity!
And if you missed the first project:
➡️ Next Mini Project: Daily Routine Reminder with Python
Need Help with a Python Assignment or Project?
Learning Python is exciting — but it can also get tricky sometimes. Whether you're stuck on a bug, running out of time on an assignment, or building something cool and just need a little help...
We’ve got your back. 💪
Our team is here to support you with:
- ✅ Python assignments & school projects
- ✅ Debugging errors or fixing code
- ✅ Custom scripts or mini tools
- ✅ Personal coding challenges or portfolio projects
Don’t struggle alone — reach out and let us help you get it done the smart way.
Let’s build something awesome together! Contact Us Now!