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.
- ➕ 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
- Python 3
- Object-Oriented Programming
- JSON
- File Handling
osmodule- Lists
- Dictionaries
- Loops
- Exception Handling
- Basic Data Analysis
python-student-grade-manager/
│
├── main.py
├── grade_manager.py
├── students.json
└── README.md
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
==============================
🎓 STUDENT GRADE MANAGER
==============================
1. Add Student
2. View Students
3. Find Top Student
4. Exit
Make sure Python 3 is installed.
Run:
python main.pyExample:
Enter Student Name: Rahul
Enter Math Marks: 80
Enter Science Marks: 75
Enter English Marks: 90
✅ Student added successfully!
Example:
===== Student List =====
1. Rahul | Total: 245.00 | Average: 81.67
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
Student information is stored permanently in students.json.
Example:
[
{
"name": "Rahul",
"marks": [80, 75, 90]
},
{
"name": "Aman",
"marks": [90, 85, 95]
}
]- Classes
- Objects
__init__()self- Methods
- Modules
- JSON
- File handling
os.path.exists()- Lists
- Dictionaries
append()enumerate()sum()max()len()any()lambdaforloopswhileloopstry/exceptValueError- Data persistence
- Basic data analysis
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.
- 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
This project is designed for learning Python programming, Object-Oriented Programming, JSON persistence, and basic data analysis.
Ayushman Tiwari
GitHub: https://github.com/ayushman-ece
This project is part of my Python project practice focused on building real-world applications and strengthening Python programming fundamentals.