forked from werhereitacademy/Python_Modul_Week_4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
77 lines (66 loc) · 3.12 KB
/
main.py
File metadata and controls
77 lines (66 loc) · 3.12 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import membersTransactions
import menuDisplay as display
import bookTransactions
while True:
try:
display.displayMainMenu()
choose = input("Enter your preference (1 to 3):")
if choose.isdigit() and 1 <= int(choose) <= 3:
print("\n")
match int(choose):
case 1:
print("\n\033[95mIt is MEMBERS transaction appear.\n")
while True:
display.displaymembersMenu()
option1 = input("Enter your preference (0 to 7):")
if option1.isdigit() and 0 <= int(option1) <= 7:
print("\n")
match int(option1):
case 0: # cikis
break
case 1: # butun uyleri cagir.
membersTransactions.membersAllList()
case 2: # uye ekleme
membersTransactions.membersAdd()
case 3: # Uye arama
membersTransactions.searchMember()
case 4: # Uye sil
membersTransactions.memberDelete()
case 5: # Kitap odunc alma
membersTransactions.bookLending()
case 6: # Kitap iade.
membersTransactions.bookReturn()
case 7:
membersTransactions.booktracking()
else:
print(
"\nLutfen belirtilen aralikta bir deger giriniz.\n")
case 2:
print("\n\033[95mIt is BOOK transaction appear.\n")
while True:
display.displayBookMenu()
option2 = (
input("Enter your preference (0 to 4):"))
if option2.isdigit() and 0 <= int(option2) <= 4:
print("\n")
match int(option2):
case 0:
break
case 1:
bookTransactions.listAllBooks()
case 2:
bookTransactions.addBook()
case 3:
bookTransactions.searchBook()
case 4:
bookTransactions.deleteBook()
else:
print(
"\nLutfen belirtilen aralikta bir deger giriniz.\n")
case 3:
print("\n\033[93mYou are exit(3)")
break
else:
print("\nLutfen belirtilen aralikta bir deger giriniz.\n")
except Exception as e:
print("Hata olustur", e)