0% found this document useful (0 votes)
43 views3 pages

TimeTable Project Part2

The document describes a Time Table Management System implemented in Python, allowing users to add classes and display the timetable. It highlights limitations such as the lack of a graphical interface and the temporary nature of data storage. The project serves as a learning experience in designing a basic system using Python and data structures like dictionaries.

Uploaded by

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

TimeTable Project Part2

The document describes a Time Table Management System implemented in Python, allowing users to add classes and display the timetable. It highlights limitations such as the lack of a graphical interface and the temporary nature of data storage. The project serves as a learning experience in designing a basic system using Python and data structures like dictionaries.

Uploaded by

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

5.

Code (Python)

# Time Table Management System in Python

timetable = {}

def add_class(day, time, subject):


if day not in timetable:
timetable[day] = {}
timetable[day][time] = subject

def display_timetable():
for day, schedule in timetable.items():
print(f"\n{day}:")
for time, subject in schedule.items():
print(f"{time} - {subject}")

def main():
while True:
print("\n--- Time Table Management ---")
print("1. Add Class")
print("2. Display Timetable")
print("3. Exit")
choice = input("Enter your choice: ")

if choice == '1':
day = input("Enter Day: ")
time = input("Enter Time: ")
subject = input("Enter Subject: ")
add_class(day, time, subject)
elif choice == '2':
display_timetable()
elif choice == '3':
break
else:
print("Invalid choice. Try again.")

if __name__ == "__main__":
main()
6. Sample Run

--- Time Table Management ---

1. Add Class

2. Display Timetable

3. Exit

Enter your choice: 1

Enter Day: Monday

Enter Time: 9:00 AM - 10:00 AM

Enter Subject: Mathematics

--- Time Table Management ---

1. Add Class

2. Display Timetable

3. Exit

Enter your choice: 2

Monday:

9:00 AM - 10:00 AM - Mathematics

7. Limitations

- This project uses a console interface; no graphical interface is provided.

- Time and subjects must be manually entered.

- Data is not saved permanently; the schedule resets after the program ends.

8. Conclusion

This project has helped me understand how to design and implement a basic time table system

using Python. I learned about data structures like dictionaries and how to create a menu-based

program.
9. Bibliography

1. www.geeksforgeeks.org

2. www.w3schools.com/python/

3. Python documentation (docs.python.org)

4. Class notes and textbooks

You might also like