You are on page 1of 16

CONTENT

Srno. Content

1. Certificate of excellence

2. Acknowledgement

3 Objective

4 Merits and Demerits

5. Working Description

6. Coding

7. Output

8. Bibliography
Certi cate
This is to certify that Anurag kr. Singh of class XII
has successfully completed the investigatory project on
the below mentioned project under the guidance of
Nandlal Mahto [sub. Teacher (CSc.)] during the
session 2022-23 in the partial fulfillment of the
Computer Science practical examination conducted by
CBSE.

Nandlal Mahto Miss. Swati Priyanka

[sub. Teacher ( CSc.)] [Principal]

_______________________
External Signature
Acknowledgment

In the accomplishment of this project successfully. Many


people have bestowed upon me their blessings and the heart
pledge support, this time I am utilizing to thank all the people
who have been concerned with this project.

Primarily I would like to thank god for being able to complete


this project with success. Then I would like to thank my
principal Miss. SWATI PRIYANKA and my Computer
Science teacher NANDLAL MAHTO whose valuable guidance
has been the ones that helped me patch this project and make it
full proof success, his suggestions and instruction has served as
the major contribution towards the completion of this project.

Then I would like to thank my parents who have helped me


with their valuable suggestions and guidance and have been
very helpful in various phases of the completion of the project.

-Anurag kr Singh | Std-12th


Objective
STUDENT MANAGEMENT SYSTEM:-

● Online Registration of Students

● Maintenance of Students Records

● Searching Students Records


MERITS AND DEMERITS

Merits:-
1. Better management of data
2. Easy Fee Management
3. Save Cost
4. Improves Overall Teacher Productivity

Demerits:-

1. User Interface
2. Requires good internet facility
3. User Requirements
4. Risk of data mishandling
WORKING DESCRIPTION

[1.] To Insert a Record ->

[2.] To Display All Records ->

[3.] To Search a Record ->

[4.] To Modify a Record ->

[5.] To Delete a Record ->

[6.] Exit
CODING

import pickle

def insert_rec( ):
record = [ ]
while True:
rno=raw_input("Enter Roll No. of the
Student :-> ")
nm=raw_input("Enter Name of the
Student :-> " )
mks=int(input("Enter Marks of the
Student :-> "))
data = [rno, nm, mks ]
record.append(data)
ch=raw_input("\nWant to enter more
records (Y/N) ? : ")
if ch.upper()=='Y':
continue
else:
break
fout=open("stud.txt","wb")
pickle.dump(record,fout)
print("\nRecord Added...")
fout.close()

def read_rec( ) :
fin=open("stud.txt", "rb")
stud_rec=pickle.load(fin)
print("\nContent of Student File are .....")
for r in stud_rec:
roll_no = r[0]
name = r[1]
marks = r[2]
print(roll_no, "\t",name,"\t", marks)
fin.close()

def search_rec( ):
fin=open("stud.txt","rb")
stud_rec=pickle.load(fin)
found=0
rn=raw_input("Enter roll no. to be searched
for -> ")

for r in stud_rec:
if r[0]==rn:
print("Sucessfull Search ", r[1], "Found
!!! ")
found=1
break
if found==0:
print("Sorry , Record Not Found...")
fin.close()

def modify_rec( ):
f=open("stud.txt","rb+")
stud_rec = pickle.load(f)
found = 0
rno = raw_input("Enter roll no. to be
Modified -> ")
for r in stud_rec:
if r[0] == rno:
print("Current name of the student is
",r[1] )
r[1] = raw_input("Enter new name : ")
print("Old marks of the student is ",r[2]
)
r[2] = raw_input("Enter new marks : ")
found = 1
break

if found == 1:
f.seek(0)
pickle.dump(stud_rec,f)
print("Record updated !!! ")
else:
print("Record not found")
f.close()

def del_rec():
f=open("stud.txt","rb")
stud_rec = pickle.load(f)
temp_list = [ ]
found = 0
f.close()
rno = raw_input("Enter roll no. to be deleted
-> ")
for r in stud_rec:
if r[0] == rno:
found = 1
continue
else:
temp_list.append(r)
if found == 1:
f=open("stud.txt","wb")
pickle.dump(temp_list,f)
print("Record deleted !!! ")
else:
print("Record not found")
f.close()
print("="*70)
print(" PROGRAM TO IMPLEMENT
VARIOUS OPERATIONS ON EMPLOYEE
DATABASE")
print("="*70)
while True:
print("\n")
print("[1.] To Insert a Record ->")
print("[2.] To Display All Records -> ")
print("[3.] To Search a Record -> ")
print("[4.] To Modify a Record -> ")
print("[5.] To Delete a Record -> ")
print("[6.] Exit")

choice = int(input("\nEnter your choice : " ))


if choice==1:
insert_rec()
elif choice==2:
read_rec()
elif choice==3:
search_rec()
elif choice == 4:
modify_rec()
elif choice==5:
del_rec()
elif choice==6:
break
else:
print("\nWrong Input ...")
print("Enter again correct choice...\n")
OUTPUT

WELCOME SCREEN

PROGRAM TO IMPLEMENT VARIOUS OPERATIONS ON EMPLOYEE DATABASE


===============================================================
=======

[1.] To Insert a Record ->


[2.] To Display All Records ->
[3.] To Search a Record ->
[4.] To Modify a Record ->
[5.] To Delete a Record ->
[6.] Exit

Enter your choice :

TO INSERT A RECORD

Enter your choice : 1


Enter Roll No. of the Student :-> 1
Enter Name of the Student :-> Anurag
Enter Marks of the Student :-> 32

Want to enter more records (Y/N) ? : N

Record Added…

TO DISPLAY ALL RECORDSTO DISPLAY ALL RECORDS


Content of Student File are .....
('1', '\t', 'Anurag', '\t', 32)

TO SEARCH A RECORD

Enter roll no. to be searched for -> 1


('Sucessfull Search ', 'Anurag', 'Found !!! ')

TO MODIFY A RECORD

Enter roll no. to be Modi ed -> 1


('Current name of the student is ', 'Anurag')
Enter new name : Anurag Singh
('Old marks of the student is ', 32)]
Enter new marks : 65
Record updated !!!

TO DELETE A RECORD

Enter roll no. to be deleted -> 1


Record deleted !!!
TO EXIT
>>>
BIBLIOGRAPHY

Internet-www.wikipedia
.com,www.encyclopedia.
com,www.google.com.

NCERT COMPUTER
SCIENCE Textbook

You might also like