RMS CS PRJ
RMS CS PRJ
SESSION: 2024-25
Class: XII
Roll no:
CLASS: XII
ROLL NO:
EXAMINATION: AISSCE-2024-25
CERTIFICATE
A.I.S.S.C.E
ACKNOWLEDGEMENT
Introduction
About Python
About Binary File
Description of variables used
Description of the user defined Functions
Description of python module in the code
Software Requirement
Hardware Requirement
Conclusion
INTRODUCTION
Features:
1. Add Train:
o Allows the user to add a new train with details like
well-formatted manner.
3. Search Train:
o Searches for a train by its train number and displays
4. Update Train:
o Updates the details of an existing train.
5. Delete Train:
o Deletes a train record by its train number.
6. Exit:
o Exits the program.
Steps to Run:
1. Save the code in a file named
railway_management.py
Notes:
This project uses pickle for binary file
operations.
When the objects are stored into binary file, we can read it by converting
byte stream back into python objects this process is known as unpickle.
Unpickling is done by using the load () functions of pickle module.
object=pickle.load(file-object)
The load () function reads byte streams from binary file convert and
returns the Object.
MINIMUM SOFTWARE REQUIREMENT
print("\nTrain Records:")
print("-" * 60)
for train in data:
print(f"Train No: {train['train_no']}, Name:
{train['name']}, "
f"Source: {train['source']}, Destination:
{train['destination']}, "
f"Departure: {train['departure']}, Arrival:
{train['arrival']}")
print("-" * 60)
train.update({
"name": name,
"source": source,
"destination": destination,
"departure": departure,
"arrival": arrival
})
# Main menu
def menu():
initialize_file()
while True:
print("\n=== Railway Management System ===")
print("1. Add Train")
print("2. View Trains")
print("3. Search Train")
print("4. Update Train")
print("5. Delete Train")
print("6. Exit")
choice = input("Enter your choice: ")
if choice == "1":
add_train()
elif choice == "2":
view_trains()
elif choice == "3":
search_train()
elif choice == "4":
update_train()
elif choice == "5":
delete_train()
elif choice == "6":
print("Exiting... Thank you!")
break
else:
print("Invalid choice! Please try again.")
1)Books
2)Online Resources
4)Research papers