-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_system.py
More file actions
42 lines (34 loc) · 1005 Bytes
/
admin_system.py
File metadata and controls
42 lines (34 loc) · 1005 Bytes
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
from colorama import Fore, init
init(autoreset=True)
def admin_menu():
while True:
choice = input(Fore.BLUE + "\tAdmin System (c/g/p/r/s/x): ").lower()
if choice == 'c':
clear_database_file()
elif choice == 'g':
group_students()
elif choice == 'p':
partition_students()
elif choice == 'r':
remove_student()
elif choice == 's':
show()
elif choice == 'x':
break
else:
print(Fore.RED + "\tInvalid option. Please try again.")
# enables admin to clear the data file “students.data”
def clear_database_file():
return 0
# shows the students organized with respect to the grade
def group_students():
return 0
# shows the pass/fail distribution
def partition_students():
return 0
# enables admin to remove a student by ID
def remove_student():
return 0
# show the students from the data file
def show():
return 0