CERTIFICATE
This is to certify that the project report entitled “Student
Record Management System” has been accomplished by
Master Aditya Atre, student of class XII-A, under my
guidance and supervision in the premises of New
Digamber Public School, Indore.
This project is submitted by him in fulfilment of “All India
Senior Secondary Certificate Exam” 2020-21 conducted
by C.B.S.E., New Delhi, as per the curriculum.
This project is absolutely genuine and does not in indulge
in plagiarism of any kind. It is the result of his endeavours
and knowledge. All the output images and observations of
made in this project are totally authentic and have been
recorded by him running the code himself.
 Teacher’s Signature               External Examiner’s Signature
       Date                              Seal of Institution
                Acknowledgement
I would like to express my heartfelt gratitude towards the
people who made the successful completion of this
Project Report possible, firstly my teacher Mr. Deepak
Gupta as well as our principal Mr. Winston Gomez, who
gave me the golden opportunity to do this wonderful
project on the topic “Student Record Management
System”, which also helped me to understand the concept
of CSV file and data handling better along with various
other Python features.
Secondly I would also like to thank my parents, sister,
friends, and seniors who helped me tremendously in
finalizing this project within the limited time frame.
Place: Indore
Date: ________
                                         Signature of Student
                                           Name of Student
                                            Class and Section
       Index
 Introduction
 System Requirements
 Objective and Features
 Coding
 Output
 Conclusion
 Applications Of Concept
 Bibliography
                   Introduction
Python is an easy-to-learn yet powerful object oriented
programming language, developed by Guido Van Rossum
in February 1991.
It is a very high level programming language, and is just as
powerful as many other middle level languages such as C,
C++, Java, etc.
Python is an expressive and interpreted language.
Furthermore it is Cross Platform, open-source and free.
A CSV file (Comma Separated Values file) is a type of plain
text file that uses specific structuring to arrange tabular
data. Because it’s a plain text file, it can contain only actual
text data, in other words,
printable ASCII or Unicode characters.
The structure of a CSV file is given away by its name.
Normally, CSV files use a comma to separate each specific
data value.
          System Requirements
HARDWARE REQUIREMENTS:
I. Operating System       :   Windows 7 and above
II. Processor             :   Pentium(Any)
III. Motherboard          :   1.845 or 915,995 for Pentium
IV. RAM                   :   512MB+
V. Hard disk              :   SATA 40 GB or above
VIII. Monitor             :   14.1 or 15 -17 inch
IX. Key board and mouse
SOFTWARE REQUIREMENTS:
  I.   Windows OS
  II. Python
  III. CSV Module
     Objective and Features
The main objective of this code is to create a system
to easily store, view, search, edit, and delete the
records of information of students of a particular
school, in this case NDPS.
Just as mentioned above, the following program can
perform the following functions:-
1) Add a new student’s entry to the database.
2) View the data of all the students at once.
3) Search and fetch the data of any specific student.
4) Edit the data of any student from the database.
5) Delete the data of any student from the database.
To achieve the above mentioned goals, I have used
CSV files. They can very easily be integrated into
Python projects, and are extremely versatile and user
friendly.
                              Coding
Below is the source code for the student record management
system made using Python and CSV files.
#NDPS STUDENT RECORD MANAGEMENT SYSTEM
import csv
student_fields = ['SNo', 'Name', 'Age', 'Email', 'Phone']
student_database = 'students.csv'
def display_menu():
  print("--------------------------------------")
  print(" Welcome to NDPS Student Record Management
System")
  print("---------------------------------------")
  print("1. Add New Student to Database")
  print("2. View Students in Database")
  print("3. Search Student in Database")
  print("4. Update Student in Database")
  print("5. Delete Student from Database")
  print("0. Quit")
def add_student():
  print("-------------------------")
  print("Add Student Information")
  print("-------------------------")
  global student_fields
  global student_database
  student_data = []
  for field in student_fields:
    value = input("Enter " + field + ": ")
    student_data.append(value)
  with open(student_database, "a") as f:
    writer = csv.writer(f)
    writer.writerows([student_data])
  print("Data saved successfully")
  input("Press any key to return to Main Menu")
  print("Rerouting back to Main Menu")
  return
def view_students():
  global student_fields
  global student_database
  print("--- Student Records ---")
  with open(student_database, "r") as f:
    reader = csv.reader(f)
    for x in student_fields:
      print(x, end=' |         ')
    print("\n-----------------------------------------------------------------")
    for row in reader:
      for item in row:
         print(item, end=" | ")
      print("\n")
  input("Press any key to return to Main Menu")
  print("Rerouting back to Main Menu")
def search_student():
  global student_fields
  global student_database
  print("--- Search Student ---")
  S = input("Enter scholar number to search: ")
  with open(student_database, "r") as f:
    reader = csv.reader(f)
    for row in reader:
      if len(row) > 0:
         if S == row[0]:
            print("----- Student Found -----")
            print("Scholar Number: ", row[0])
            print("Name: ", row[1])
            print("Age: ", row[2])
            print("Email: ", row[3])
            print("Phone: ", row[4])
            break
    else:
      print("Scholar Number does not exist in Database")
  input("Press any key to return to Main Menu")
  print("Rerouting back to Main Menu")
def update_student():
  global student_fields
  global student_database
  print("--- Update Student ---")
  S = input("Enter scholar number to update: ")
  index_student = None
  updated_data = []
  with open(student_database, "r") as f:
    reader = csv.reader(f)
    counter = 0
    for row in reader:
      if len(row) > 0:
        if S == row[0]:
           index_student = counter
           print("Student Found: at index ",index_student)
           student_data = []
           for field in student_fields:
             value = input("Enter " + field + ": ")
             student_data.append(value)
           updated_data.append(student_data)
else:
            updated_data.append(row)
          counter += 1
print("Student Profile edited successfully")
if index_student is not None:
   with open(student_database, "w") as f:
        writer = csv.writer(f)
        writer.writerows(updated_data)
else:
   print("Scholar Number does not exist in database")
input("Press any key to return to Main Menu")
print("Rerouting back to Main Menu")
def delete_student():
  global student_fields
  global student_database
  print("--- Delete Student ---")
  S = input("Enter scholar number to delete: ")
  student_found = False
  updated_data = []
  with open(student_database, "r") as f:
    reader = csv.reader(f)
    counter = 0
    for row in reader:
      if len(row) > 0:
         if S != row[0]:
           updated_data.append(row)
           counter += 1
         else:
           student_found = True
  if student_found is True:
    with open(student_database, "w") as f:
      writer = csv.writer(f)
      writer.writerows(updated_data)
    print("Scholar Number ", S, "deleted successfully")
else:
     print("Scholar Number does not exist in database")
  input("Press any key to return to Main Menu")
  print("Rerouting back to Main Menu")
while True:
  display_menu()
  x = input("Enter number corresponding to the option you
would like to choose: ")
  if x == '1':
     add_student()
  elif x == '2':
     view_students()
  elif x == '3':
     search_student()
  elif x == '4':
     update_student()
  elif x == '5':
     delete_student()
  else:
     break
print("-------------------------------")
print(" Thank you for using NDPS Student Record Management
System")
print("Developed by Aditya Atre")
print("-------------------------------")
Output
                  Conclusion
The above programme proves itself to be a pretty robustly
working record management system.
Although lacking many features needed for large scale
usage, the above program lays the framework that is
needed to build any functional record management
system.
As demonstrated above, the programme is fully capable of
adding new entries, displaying all the present entries ,
searching for specific students, and updating and deleting
entries from the database.
The program not only performs the above functions with
extreme ease, but returns a message informing the user if
the record entry trying to be fetched, searched, updated,
or deleted doesn’t already exist in the database.
Thus it is safe to say, this program, aiming to provide the
user with a “Student Record Management System” is fully
functional, and fulfils all the basic requirements to be
deemed the same.
     Applications of Concept
The aforementioned and demonstrated programme is
based on the concept of using CSV(Comma Separated
Value) files along with the programming language Python.
This is a simple yet effective combination, and can be used
in numerous application based projects, some of them
being :
  Hotel Management System
  Hospital Management System
  Library Management System
  Vehicle Rental Service System
  Restaurant Management System
  Bank Management System
  Railway Management System
  Movie Theatre Management System
  Survey Form Data Collection System
  Supermarket Billing System
And many more.
Thus we can say that this concept has countless real life
applications and can be used to make monotonous daily
jobs a lot easier.
     Bibliography
 Sumita Arora Class XI CS Book
 Sumita Arora Class XII CS Book
 www.geeksforgeeks.org
 www.w3schools.com
 realpython.com
 python.mykvs.in