-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
46 lines (40 loc) · 1.35 KB
/
app.py
File metadata and controls
46 lines (40 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import sys
from modules.report import export_report_csv, generate_class_report_console
from modules.student import (add_student, search_student, show_all_students,
update_subjects_marks)
from utils.menu_decorator import heading, horizontal_line
def main():
while True:
heading("Smart Student Management System")
print("1. Add student")
print("2. Search student")
print("3. Update subject or mark")
print("4. Show all students")
print("5. Generate class report")
print("6. Export report (csv)")
print("7. Exit")
horizontal_line()
option = input("\nEnter option: ").strip()
if option == "1":
add_student()
elif option == "2":
search_student()
elif option == "3":
update_subjects_marks()
elif option == "4":
show_all_students()
elif option == "5":
generate_class_report_console()
elif option == "6":
export_report_csv()
elif option == "7":
print("\n:) Thanks for using App! See you next time.")
break
else:
print("\n:( Invalid option. Try again.")
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("\n:( Keyboard Interrupted.")
sys.exit(0)