0% found this document useful (0 votes)
4 views2 pages

Student Management System for Class 11

The document contains a Python program for managing student records, allowing users to save, display, search, update, and delete student information based on roll numbers. It uses a dictionary to store student details, including names and marks for three subjects. The program provides a menu-driven interface for user interaction.

Uploaded by

pandeyurja777
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Student Management System for Class 11

The document contains a Python program for managing student records, allowing users to save, display, search, update, and delete student information based on roll numbers. It uses a dictionary to store student details, including names and marks for three subjects. The program provides a menu-driven interface for user interaction.

Uploaded by

pandeyurja777
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

stud = {}

def SAVE():
r = int(input("Enter the Roll No: "))
m = eval(input("Enter the Marks of three Subjects: "))
nm = input("Enter the Name: ")
stud [r] = [nm,m[0],m[1],m[2]]

def SHOW():
for k,v in [Link]():
print("Roll No: ",k)
print("Name: ",v[0])
print("Marks of Subject_1: ",v[1])
print("Marks of Subject_2: ",v[2])
print("Marks of Subject_3: ",v[3])

def SEARCH():
r = int(input("Enter the Roll No: "))
print(" ")
for k,v in [Link]():
if r==k:
print("Roll No: ",k)
print("Name: ",v[0])
print("Marks of Subject_1: ",v[1])
print("Marks of Subject_2: ",v[2])
print("Marks of Subject_3: ",v[3])

def UPDATE():
r = int(input("Enter the Roll No: "))
print(" ")
m = eval(input("Enter the NEW Marks of three Subjects as Sub-1,Sub-2,Sub-3 (-1
in place of NO UPDATE): "))
c = 0

for k in stud:
if k==r:
c=1
if m[0]!=-1:
stud[k][1]=m[0]
if m[1]!=-1:
stud[k][2]=m[1]
if m[2]!=-1:
stud[k][3]=m[2]
if c==1:
print()
print("Update Successfull!")
else:
print()
print("Data Not Found!")

def DELETE():
r = int(input("Enter the Roll No: "))
[Link](r)
print()
print("Data Deleted Successfully!")

ch = 1
while ch!=6:
print("-"*100)
print("1: For Entering Student Details")
print("2: For Displaying Student Data")
print("3: For Searching Student Data")
print("4: For Updating Student Data")
print("5: For Deleting Student Data")
print("6: To Exit the Program")
print("-"*100)
ch = int(input("Enter your Choice: "))
print(" ")
if ch==1:
SAVE()
elif ch==2:
SHOW()
elif ch==3:
SEARCH()
elif ch==4:
UPDATE()
elif ch==5:
DELETE()

You might also like