Daily Python Projects

Daily Python Projects

Build a School Management System with Class Inheritance

Level: Beginner

Ardit Sulce's avatar
Ardit Sulce
Jan 13, 2026
∙ Paid

Yesterday we built a grade calculator using classes (see the project here: https://dailypythonprojects.substack.com/p/build-a-grade-calculator-with-classes). Today, we’re extending it by learning inheritance — one of the most powerful concepts in Object-Oriented Programming! We’ll create a Person base class and have both Student and Teacher classes inherit from it, showing how code reusability works in real applications.

Project Task

Create a school management system with inheritance that:

  • Uses a base Person class with name and age attributes

  • Creates a Student class that inherits from Person and adds scores

  • Creates a Teacher class that inherits from Person and adds subject

  • Uses the super() function to call the parent class constructor

  • Demonstrates how child classes inherit parent methods

  • Shows how child classes can add their own unique methods

  • Creates instances of both Student and Teacher objects

  • Displays information for both types of people in the system

This project gives you hands-on practice with inheritance, the super() function, parent-child relationships, and code reusability — essential skills for building scalable, maintainable applications.

Expected Output


And here is the code of the previous project to help you start with today’s project:

# Print header
print("Grade Calculator (OOP Version)")
print("==============================\n")

# Define the Student class
class Student:

    # Initialize the student with name and scores
    # (use __init__ method with self parameter)
    def __init__(self, name, scores):
        self.name = name
        self.scores = scores
    
    # Method to calculate average score
    # (access self.scores to calculate average)
    def calculate_average(self):
        average = sum(self.scores) / len(self.scores)
        return average
    
    # Method to convert average to letter grade
    # (use self.calculate_average() to get the score)
    def get_letter_grade(self):
        score = self.calculate_average()
        if score >= 90:
            return "A"
        elif score >= 80:
            return "B"
        elif score >= 70:
            return "C"
        elif score >= 60:
            return "D"
        else:
            return "F"
    
    # Method to determine pass/fail status
    # (use self.calculate_average() to get the score)
    def get_status(self):
        score = self.calculate_average()
        if score >= 60:
            return "PASS"
        else:
            return "FAIL"
    
    # Method to generate the complete report
    # (call other methods using self)
    def generate_report(self):
        average = self.calculate_average()
        letter_grade = self.get_letter_grade()
        status = self.get_status()
        
        print("\nStudent Grade Report")
        print("====================")
        print(f"Name: {self.name}\n")
        print(f"Test Scores: {', '.join(map(str, self.scores))}")
        print(f"Average Score: {average:.1f}")
        print(f"Letter Grade: {letter_grade}")
        print(f"Status: {status}\n")

# Get user input
# (student name)
name = input("Enter student name: ")

# Get test scores
# (comma-separated string, convert to list of integers)
scores_input = input("\nEnter test scores (comma-separated): ")
scores = [int(score.strip()) for score in scores_input.split(',')]

# Print processing message
print("\nProcessing grades...")

# Create a Student object
# (instantiate the class with name and scores)
student = Student(name, scores)

# Generate the report
# (call the generate_report method on the student object)
student.generate_report()

# Print completion message
print("Report generated successfully!")

Skeleton and Solution

Below you will find both a downloadable skeleton.py file to help you code the project with comment guides and the downloadable solution.py file containing the correct solution.

Get the code skeleton here:

Keep reading with a 7-day free trial

Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2026 Ardit Sulce · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture