Skip to content

Commit b526519

Browse files
[shubham] Add: This file contains main function from where the execution of AddressBook starts.
1 parent 1354d33 commit b526519

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

main.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from AddressBook_Service import AddressBook
2+
3+
def main():
4+
5+
while True:
6+
print("--Address Book System--")
7+
print("-----------------------")
8+
print("1.Add contact")
9+
print("2.Print Contact")
10+
print("3.Exit")
11+
choice = int(input("Enter choice: "))
12+
if choice == 1:
13+
contact = AddressBook.add_contact()
14+
15+
elif choice == 2:
16+
AddressBook.display_contact(contact)
17+
18+
elif choice == 3:
19+
return False
20+
21+
22+
23+
if __name__ == "__main__":
24+
main()

0 commit comments

Comments
 (0)