Cs Project Completed
Cs Project Completed
1) Data Structure
Uses a dictionary called students to store student records.
Each student is stored with their Roll Number as the key and their details (Name, Class,
Section, Admission Number) as the values in a nested dictionary.
2) Main Menu Loop
The program runs continuously until the user chooses to exit (option 6).
It displays 6 options for user interaction, allowing the user to manage student records.
Uses input () to get the user's choice and performs the corresponding operation.
3) Key Functions
Add Student (Option 1):
Prompts the user to enter the student’s Roll Number, Name, Class, Section, and Admission
Number.
The entered data is stored in the student dictionary.
Ensures the data is entered correctly and adds the student to the system.
View Students (Option 2):
Displays all student records stored in the system.
If there are no students in the system, a message is shown stating "No students found."
Edit Student (Option 3):
Prompts the user to enter the Roll Number of the student to edit.
If the student exists, the program allows the user to update the student’s details (Name,
Class, Section, Admission Number).
If a field is left blank, it retains the current value.
Delete Student (Option 4):
Prompts the user to enter the Roll Number of the student to delete.
If the student exists in the dictionary, it deletes the student's record.
Displays a confirmation message if the student is deleted successfully.
Display All Students (Option 5):
Lists all students with their details in a formatted way.
If no students exist, a message is displayed: "No students to display."
Exit (Option 6):
Ends the program by breaking out of the main loop and displaying an exit message.
4) Error Handling
Ensures the user enters a valid choice from the available options.
Checks whether the entered Roll Number exists when editing or deleting a student.
Displays appropriate messages when the Roll Number is not found or if an invalid choice is
made.
The program doesn't allow users to overwrite student records without providing valid input.
5) Improvements
Input Validation:
Ensure that Roll Numbers are valid and unique.
Ensure that user inputs for fields like Name, Class, Section, and Admission Number are
properly formatted.
Additional Features:
Add functionality to sort students based on class or section.
Allow partial search functionality, so users can search for students by name or admission
number.
Add a feature to list students who have been added in the past week, month, etc.
Error Handling:
Use try-except blocks to handle any invalid input errors gracefully.
Add confirmation prompts before deletion to prevent accidental deletions.
User Experience:
Improve the menu display formatting for better readability.
Include a confirmation message upon exiting the program, so the user knows the action was
completed successfully.
Conclusion:
This student management system effectively manages student records, and with the suggested
improvements, it can become a more robust and user-friendly application.
CERTIFICATE OF COMPLETION
This is to certify that the Project titled School Database , Computer Science, is a bonafide work
carried out and successfully completed by Akshat Aggarwal of class 11 A The Indian School, New
Delhi, for the fulfilment of Project Work.
Teacher Guide
(Ms. Simranjeet Kaur)
ACKNOWLEDGEMENTS
A project is a golden opportunity for learning and self-development. I consider
myself fortunate and privileged to have such wonderful mentors guide me
through the journey to the completion of the project.
My sincere thanks to Ms Tania Joshi, Principal, The Indian School, New Delhi,
for always encouraging me to put forth my best.
CODE
students = {
"101": {
"Name": "Rohit Sivastav",
"Class": "11th",
"Section": "A",
"Admission Number": "ADM001"
},
"102": {
"Name": "Anush Malik",
"Class": "12th",
"Section": "B",
"Admission Number": "ADM002"
},
"103": {
"Name": "Anku Kumar",
"Class": "9th",
"Section": "C",
"Admission Number": "ADM003"
},
"104": {
"Name": "Akshay Kumar",
"Class": "11th",
"Section": "A",
"Admission Number": "ADM004"
}
}
while True:
print("\nOptions:")
print("1. Add Student")
print("2. View Students")
print("3. Edit Student")
print("4. Delete Student")
print("5. Display All Students")
print("6. Exit")
if choice == "1":
roll_no = input("Enter Roll No: ")
name = input("Enter Name: ")
student_class = input("Enter Class: ")
section = input("Enter Section: ")
admission_number = input("Enter Admission Number: ") # Fixed variable name typo
students[roll_no] = {
"Name": name,
"Class": student_class,
"Section": section,
"Admission Number": admission_number
}
print("Student Added Successfully!")
else:
print("Invalid Choice! Try Again.")