0% found this document useful (0 votes)
4 views

Vedant Aggarwal Ip Project - Copy

The document presents a project on a Student Management System completed by Vedant Aggarwal for the CBSE curriculum. It includes sections such as a certificate of completion, acknowledgments, source code, and output. The source code provides functionalities for adding, viewing, searching, updating, and deleting student records using CSV files.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Vedant Aggarwal Ip Project - Copy

The document presents a project on a Student Management System completed by Vedant Aggarwal for the CBSE curriculum. It includes sections such as a certificate of completion, acknowledgments, source code, and output. The source code provides functionalities for adding, viewing, searching, updating, and deleting student records using CSV files.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

IP PROJECT

STUDENT
MANAGEMENT SYSTEM

BY
NAME:VEDANT AGGARWAL
ROLL NO:33
BOARD ROLL NO:14636639
CLASS:S7H
Index
s.no name page
1 certificate 3
2 acknowledge 4
ment
3 Source code 5
4 output 15
CERTIFICATE
This is to certify that the INFORMATION PRACTICES
project on student Management
System has been successfully completed by Vedant
Aggarwal of Class XII, MODERN SCHOOL
BARAKHAMBA ROAD for consideration in partial
fulfillment of curriculum of
Central Board of Secondary Education (CBSE) of
INFORMATION PRACTICES for the
award of AISSCE Practical Examination 2024-25.
I certify that this project is up to my expectation and as
per the guidelines issued by the CBSE.

Date: ……

SIGNATURE SIGNATURE
INTERNAL EXAMINER EXTERNAL EXAMINER
ACKNOWLEDGEMENT

I would like to express my special gratitude to the


Principal,
Dr. Vijay Dutta
for their encouragement and for all the support that she
provided for this work. I am grateful to
my teacher
Divya Sahdev
for supporting me throughout completion of this project .I
also extend my sincere gratitude to my family without
whom this project would not have been possible.
SOURCE CODE

import csv

Import pandas as pd

Import numpy as np

Define global variables

student_fields = ['roll', 'name', 'age', 'email', 'phone']

student_database = 'students.csv'

def display_menu():

print("-------------------------------------")

print(" Welcome to Student Management System")

print("-------------------------------------")

print("1. Add New Student")

print("2. View Students")

print("3. Search Student")

print("4. Update Student")


print("5. Delete Student")

print("6. 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", encoding="utf-8") as f:

print("Data saved successfully")

input("Press any key to continue")

return

def view_students():

global student_fields

global student_database
print("--- Student Records ---")

with open(student_database, "r", encoding="utf-8") as f:

reader = csv.reader(f) for x in student_fields:

print(x, end='\t |')

print("\n----------------------------------------------------------------")

for row in reader:

for item in row:

print(item, end="\t |")

print("\n") input("Press any key to continue")

def search_student():

print("--- Search Student ---")

roll = input("Enter roll no. to search: ")

with open(student_database, "r", encoding="utf-8") as f:

reader = csv.reader(f)

for row in reader: if len(row) > 0:

if roll == row[0]:

print("----- Student Found -----")

print("Roll: ", row[0])

print("Name: ", row[1])


print("Age: ", row[2])

print("Email: ", row[3])

print("Phone: ", row[4]) break else:

print("Roll No. not found in our database")

input("Press any key to continue")

def update_student():

print("--- Update Student ---")

roll = input("Enter roll no. to update: ")

index_student = None

updated_data = []

with open(student_database, "r", encoding="utf-8") as f:

reader = csv.reader(f)

counter = 0 for row in reader:

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

if index_student is not None:

with open(student_database, "w", encoding="utf-8")as


f:

else:
print("Roll No. not found in our database")
input("Press any key to continue")
def delete_student():

print("--- Delete Student ---")

roll = input("Enter roll no. to delete: ")

student_found = False

updated_data

reader = csv.reader(f)

counter = 0
for row in reader:

if len(row) > 0:

if roll != row[0]:
updated_data.append(row)

else:

student_found = True

if student_found is True:

with open(student_database, "w", encoding="utf-8")as


f:
writer.writerows(updated_data)

print("Roll no. ", roll, "deleted successfully")


else:

print("Roll No. not found in our database")

input("Press any key to continue")

while True:
display_menu()
choice = input("Enter your choice: ")
if choice == '1':
add_student()

elif choice == '2':


view_students()

elif choice ==
search_student()

elif choice == '4':

update_student()

elif choice == '5':

delete_student()

else:

break

print("-------------------------------")

print(" Thank you for using our system")

print("-------------------------------")
OUTPUT

You might also like