-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (32 loc) · 986 Bytes
/
main.py
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
from functions import output_data, input_data, del_data, search_data, blue_text, orange_text, yellow_text, red_text, \
green_text
def task():
print(f"\n\n"
f"{orange_text('******* ACTIONS *******')}\n\n"
f"Read Existing Data: {yellow_text('R')}\n"
f"Input New Data: {yellow_text('I')}\n"
f"Delete Old Data: {yellow_text('D')}\n"
f"Search Data: {yellow_text('S')}\n"
f"Exit: {yellow_text('E')}"
f"")
n = input(blue_text('\nTask [R/I/D/S/E]: '))
if n.upper() == 'R':
output_data()
task()
elif n.upper() == 'I':
input_data()
task()
elif n.upper() == 'D':
del_data()
task()
elif n.upper() == 'S':
search_data()
elif n.upper() == 'E':
print(green_text('\nThank You!\n'))
exit()
else:
print(red_text("\nENTER A VALID OPTION!"))
task()
if __name__ == "__main__":
while True:
task()