Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🎓 Python Student Grade Manager

A command-line Student Grade Manager built with Python, Object-Oriented Programming, and JSON file storage.

The application allows users to add students, store their subject marks, view student results, calculate averages, and find the student with the highest total marks.

🚀 Features

  • ➕ Add students
  • 👀 View all students
  • 📊 Calculate total marks
  • 📈 Calculate average marks
  • 🏆 Find the top student
  • 💾 Persistent JSON storage
  • 🛡️ Marks validation
  • 🖥️ Menu-driven command-line interface

🛠️ Technologies Used

  • Python 3
  • Object-Oriented Programming
  • JSON
  • File Handling
  • os module
  • Lists
  • Dictionaries
  • Loops
  • Exception Handling
  • Basic Data Analysis

📂 Project Structure

python-student-grade-manager/
│
├── main.py
├── grade_manager.py
├── students.json
└── README.md

🧠 How It Works

The program stores each student's name and marks for three subjects:

  • Mathematics
  • Science
  • English

Example:

{
    "name": "Rahul",
    "marks": [80, 75, 90]
}

The program can then calculate:

Total = 80 + 75 + 90 = 245

Average = 245 / 3 = 81.67

📋 Menu

==============================
🎓 STUDENT GRADE MANAGER
==============================
1. Add Student
2. View Students
3. Find Top Student
4. Exit

▶️ How to Run

Make sure Python 3 is installed.

Run:

python main.py

📝 Adding a Student

Example:

Enter Student Name: Rahul
Enter Math Marks: 80
Enter Science Marks: 75
Enter English Marks: 90

✅ Student added successfully!

📊 Viewing Students

Example:

===== Student List =====
1. Rahul | Total: 245.00 | Average: 81.67

🏆 Finding the Top Student

The program calculates the total marks of every student and uses the highest total to determine the top student.

Example:

🏆 ===== Top Student =====
Name    : Aman
Total   : 270.00
Average : 90.00

💾 Data Storage

Student information is stored permanently in students.json.

Example:

[
    {
        "name": "Rahul",
        "marks": [80, 75, 90]
    },
    {
        "name": "Aman",
        "marks": [90, 85, 95]
    }
]

🧠 Python Concepts Practiced

  • Classes
  • Objects
  • __init__()
  • self
  • Methods
  • Modules
  • JSON
  • File handling
  • os.path.exists()
  • Lists
  • Dictionaries
  • append()
  • enumerate()
  • sum()
  • max()
  • len()
  • any()
  • lambda
  • for loops
  • while loops
  • try/except
  • ValueError
  • Data persistence
  • Basic data analysis

🔍 Validation

The program checks that marks are between 0 and 100.

For example:

Math: 80
Science: 120
English: 90

will be rejected because 120 is outside the valid range.

🔮 Future Improvements

  • Add more subjects
  • Add grades such as A, B, C, and D
  • Calculate class average
  • Find highest and lowest marks
  • Search students
  • Delete students
  • Update marks
  • Generate report cards
  • Export results to CSV
  • Add GUI interface
  • Add database support

⚠️ Note

This project is designed for learning Python programming, Object-Oriented Programming, JSON persistence, and basic data analysis.

👨‍💻 Author

Ayushman Tiwari

GitHub: https://github.com/ayushman-ece

🎯 Learning Goal

This project is part of my Python project practice focused on building real-world applications and strengthening Python programming fundamentals.

About

An advanced Python student performance manager with JSON storage, marks analysis, average calculation, and top student identification.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages