Student Management
Student Management
On
Student Management System
Submitted By:
Jiya Rawat
Class: XII
Submitted To:
Mr. Vikram Singh Rawat
St. Benedict's School, Shivpuri
Certi cate
This is to certify that the project titled "Student Management
System" submitted by Jiya Rawat, a student of Class XII, has
been completed under my guidance and supervision.
The project is a partial ful llment of the requirement for the
Computer Science course, CBSE Class XII.
1. Objective
2. Tools and Technologies Used
3. Features
4. Python Code
5. Output Screenshots
6. Conclusion
Objective
The objective of this project is to create a simple Student Management System using Python and
CSV as the backend. This project provides features to add, view, update, delete, and search student
records.
Features
1. Add Student
2. View Students
3. Search Student
4. Delete Student
5. Update Student
Python Code
import csv
import os
try:
with open( le_name, mode='r') as le:
reader = csv.reader( le)
for row in reader:
if row[0] == roll_number:
print("\nStudent Record Found:")
print("Roll Number: ", row[0])
print("Name: ", row[1])
print("Class: ", row[2])
print("Marks: ", row[3])
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
found = True
break
if not found:
print("\nStudent record not found!\n")
except FileNotFoundError:
print("No records found. Please add some students rst.\n")
try:
with open( le_name, mode='r') as le:
reader = csv.reader( le)
for row in reader:
if row[0] != roll_number:
rows.append(row)
else:
found = True
if found:
with open( le_name, mode='w', newline='') as le:
writer = csv.writer( le)
writer.writerows(rows)
print("\nStudent record deleted successfully!\n")
else:
print("\nStudent record not found!\n")
except FileNotFoundError:
print("No records found. Please add some students rst.\n")
if found:
with open( le_name, mode='w', newline='') as le:
writer = csv.writer( le)
writer.writerows(rows)
print("\nStudent record updated successfully!\n")
else:
print("\nStudent record not found!\n")
except FileNotFoundError:
print("No records found. Please add some students rst.\n")
def main():
"""Main function to drive the program."""
le_name = "students.csv"
initialize_csv( le_name)
while True:
print("Student Management System")
print("1. Add Student")
print("2. View Students")
print("3. Search Student")
print("4. Delete Student")
print("5. Update Student")
print("6. Exit")
fi
fi
fi
fi
fi
fi
fi
fi
fi
choice = input("Enter your choice (1-6): ")
if choice == '1':
add_student( le_name)
elif choice == '2':
view_students( le_name)
elif choice == '3':
search_student( le_name)
elif choice == '4':
delete_student( le_name)
elif choice == '5':
update_student( le_name)
elif choice == '6':
print("Exiting the program. Goodbye!")
break
else:
print("Invalid choice. Please try again.\n")
if __name__ == "__main__":
main()
Output Screenshots
1. Adding a Student
fi
fi
fi
fi
fi
2. Viewing Students
3. Searching a Student
4. Deleting a Student
5. Updating a Student
Conclusion
This project demonstrates the ability to perform basic CRUD operations using Python and a CSV
backend. It is simple, ef cient, and user-friendly.
Let me know if you'd like a formatted PDF or Word version of this report!
fi
Bibliography
1. Python Documentation
◦ URL: https://docs.python.org/3/
◦ Description: Of cial Python documentation used for understanding core libraries and
syntax.
2. CSV Module Documentation
◦ URL: https://docs.python.org/3/library/csv.html
◦ Description: Reference for using the csv module to handle CSV le operations.
3. W3Schools - Python Tutorials
◦ URL: https://www.w3schools.com/python/
◦ Description: Tutorials and examples for learning Python programming basics and
advanced concepts.
4. GeeksforGeeks - Python Programming
◦ URL: https://www.geeksforgeeks.org/python-programming-language/
◦ Description: Examples and explanations of Python functionalities relevant to the
project.
5. Stack Over ow
◦ URL: https://www.programiz.com/python-programming/csv
◦ Description: Guide for handling CSV les in Python, including reading, writing, and
updating data.
This bibliography section ensures proper credit to all the resources used during the project
development.
fl
fi
fl
fi
fi
fi