Skip to content

devendraDPI/smart-student-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Student Management System

Overview

  • This is a modular Smart Student Management System built in Python, designed for managing student records, calculating academic performance, and generating reports.
  • It features a console-based, menu-driven interface that handles adding, searching, updating, and reporting on students.
  • Data is stored in a simple in-memory dictionary (via database/students.py) for persistence across sessions within the program runtime.
  • The system emphasizes clean code organization with separated modules for students (modules/student.py), reports (modules/report.py), and utilities (utils/).
  • It includes input validation, error handling, and formatted outputs for a user-friendly experience.
  • Developed as a Python assignment project, it demonstrates object-oriented principles through modular design, exception handling, and core language features.

Key Features

  • Add Students: Validate roll number, name, subjects, and marks (0-100 range).
  • Search Students: By roll number or name (case-insensitive).
  • Update Records: Add/remove subjects or update marks with automatic validation.
  • View All Students: Detailed tabular display for each student.
  • Generate Reports: Console class summary (total students, highest/lowest marks, average marks, grade distribution).
  • Export CSV: CSV reports with roll number, name, subjects, marks, percentage, grade, and remark.
  • Error Handling: Robust checks for invalid inputs, duplicates, and empty data.
  • Grading System: Percentage-based grades (A+/A/B/C/D/F) with descriptive remarks.

Concepts Applied

  • Modular Design: Functions split across modules (e.g., add_student() in modules/student.py).
  • Data Structures: Dictionaries for storage, tuples for subjects (immutable), lists for marks (mutable).
  • Control Flow: while True loops for menus/input validation, if-elif-else for grading/options.
  • Exception Handling: try-except for ValueError (invalid integer) and IndexError (out-of-bounds).
  • Operators & Functions: Arithmetic (sum()/len() for percentage), string methods (.title(), .strip()), custom utils like comma_separated_input().
  • File I/O: CSV writing with csv.writer and timestamped filenames.
  • Other: Decorators-inspired utils (heading(), horizontal_line()) for formatting.

Menu Options

  1. Add Student: Prompts for roll number, name, subjects (comma-separated), and marks (comma-separated).
  2. Search Student: Choose roll number or name. Displays full record if found.
  3. Update Subject/Mark: For a given roll number, add, remove a subject, or update the mark.
  4. Show All Students: Lists all students with headings, subjects table, percentage, grade, and remark.
  5. Generate Class Report: Console output with stats and grade distribution.
  6. Export Report (CSV): Saves a detailed report to students_report_YYYYMMDD_HHMMSS.csv file.
  7. Exit: Gracefully ends the program.

Project Structure

.
|-- app.py
|-- database
|   `-- students.py
|-- modules
|   |-- report.py
|   `-- student.py
`-- utils
    |-- menu_decorator.py
    `-- utils.py

3 directories, 6 files

Data Structure Example

  • Student data is stored in students_data (global dict in database/students.py)
students_data = {
    1001: {
        "name": "Devendra Indapawar",
        "subjects": (
            "English",
            "Marathi",
            "Hindi",
            "Maths",
            "Science",
            "Social Science",
        ),
        "marks": [92, 96, 95, 97, 92, 94],
    }
}
  • Percentages and grades are calculated on-the-fly using utils/utils.py.

Installation & Setup

  1. Prerequisites

    • Python 3.12
    • No external libraries required (uses built-in csv and datetime modules).
  2. Clone the Repository

    git clone https://github.com/devendraDPI/smart-student-management-system.git
    cd smart-student-management-system
  3. Run the Application

    python app.py
    • The program will launch the main menu. Use numbers to navigate options.

Sample Session

==================================================
         Smart Student Management System
==================================================
1. Add student
2. Search student
3. Update subject or mark
4. Show all students
5. Generate class report
6. Export report (csv)
7. Exit
--------------------------------------------------

Enter option: 1

==================================================
                   Add Student
==================================================
Total Student(s)         : 0
Last roll number         : n/a

Enter roll number: 1001
Enter name: Devendra Indapawar
Enter subject(s) (comma separated): English, Marathi, Hindi, Maths, Science, Social Science
Enter marks for 6 subject(s) (comma separated): 92, 96, 95, 97, 92, 94
:) Student Added Successfully.


==================================================
         Smart Student Management System
==================================================
1. Add student
2. Search student
3. Update subject or mark
4. Show all students
5. Generate class report
6. Export report (csv)
7. Exit
--------------------------------------------------

Enter option: 5

==================================================
                   Class Report
==================================================
Total Student(s)         : 1
Highest Marks in Class   : 97
Lowest Marks in Class    : 92
Average Score            : 94.33

Grade Distribution:
        Grade A+  : 1 student(s)
--------------------------------------------------

==================================================
         Smart Student Management System
==================================================
1. Add student
2. Search student
3. Update subject or mark
4. Show all students
5. Generate class report
6. Export report (csv)
7. Exit
--------------------------------------------------

Enter option: 6
:) Exported report to students_report_20251107_111912.csv

==================================================
         Smart Student Management System
==================================================
1. Add student
2. Search student
3. Update subject or mark
4. Show all students
5. Generate class report
6. Export report (csv)
7. Exit
--------------------------------------------------

Enter option: 7

:) Thanks for using App! See you next time.

Screenshots

  • Main Menu Main Menu

  • Add Student Add Student

  • Search Student By Roll Number Search Student By Roll Number

  • Search Student By Name Search Student By Name

  • Add Subject Add Subject

  • Remove Subject Remove Subject

  • Update Marks Update Marks

  • All Students All Students

  • Class Report Class Report

  • Export Report To CSV Export Report To CSV

  • Students Report In Excel Students Report In Excel

  • Exit Application Exit Application

Video

  • See how the Smart Student Management System works, from adding student records to generating reports, in this video walkthrough.

YouTube

License

  • MIT License: See License file for details.

About

A Python-based CLI app for streamlining student record management. Key features include adding/searching/updating students, calculating percentages/grades, generating class reports, and exporting to CSV. Built with built-in modules, dictionaries, lists, tuples, robust exception handling, and Python 3.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages