Docsity

Student Management System Project in Python, Summaries of Computer science

Toggle sidebar
bg1
Programming Project: Student
Management System (Python)
1. Project Overview
This project is a simple Student Management System written in Python. It allows users to add,
search, delete, and display student records stored in a text file. The project is suitable for
beginners learning file handling and basic Python concepts.
2. Objectives
- Understand basic Python syntax and file handling
- Learn how to perform CRUD operations (Create, Read, Update, Delete)
- Build a console-based project that stores data persistently
- Develop modular code using functions
3. Tools and Technologies Used
- Programming Language: Python 3
- IDE: VS Code / PyCharm / IDLE
- Platform: Windows / Linux / macOS
4. Sample Project Code (student_management.py)
def add_student():
name = input('Enter student name: ')
roll = input('Enter roll number: ')
with open('students.txt', 'a') as f:
f.write(f'{roll},{name}\n')
def display_students():
with open('students.txt', 'r') as f:
for line in f:
roll, name = line.strip().split(',')
print(f'Roll: {roll}, Name: {name}')
def search_student():
roll_search = input('Enter roll number to search: ')
found = False
with open('students.txt', 'r') as f:
for line in f:
roll, name = line.strip().split(',')
pf2

Partial preview of the text

Download Student Management System Project in Python and more Summaries Computer science in PDF only on Docsity!

Programming Project: Student

Management System (Python)

1. Project Overview

This project is a simple Student Management System written in Python. It allows users to add, search, delete, and display student records stored in a text file. The project is suitable for beginners learning file handling and basic Python concepts.

2. Objectives

  • Understand basic Python syntax and file handling
  • Learn how to perform CRUD operations (Create, Read, Update, Delete)
  • Build a console-based project that stores data persistently
  • Develop modular code using functions

3. Tools and Technologies Used

  • Programming Language: Python 3
  • IDE: VS Code / PyCharm / IDLE
  • Platform: Windows / Linux / macOS

4. Sample Project Code (student_management.py)

def add_student(): name = input('Enter student name: ') roll = input('Enter roll number: ') with open('students.txt', 'a') as f: f.write(f'{roll},{name}\n') def display_students(): with open('students.txt', 'r') as f: for line in f: roll, name = line.strip().split(',') print(f'Roll: {roll}, Name: {name}') def search_student(): roll_search = input('Enter roll number to search: ') found = False with open('students.txt', 'r') as f: for line in f: roll, name = line.strip().split(',')

if roll == roll_search: print(f'Student Found - Roll: {roll}, Name: {name}') found = True break if not found: print('Student not found.')

5. Working Explanation

The system stores student data in a text file named 'students.txt'. Each line contains the roll number and name of a student. The program provides options to add new students, display all students, and search a student by their roll number.

6. Future Enhancements

  • Add GUI interface using Tkinter
  • Store data in a database like SQLite instead of a text file
  • Add functionality to update or delete student records
  • Secure access using login system

7. Conclusion

This project provides a foundation for understanding file handling and basic operations in Python. It can be extended into more complex applications and serves as a great starting point for new programmers.