Skip to content

Commit 2495627

Browse files
[Shubham] Add: Provides a update option to user.
1 parent 49c231a commit 2495627

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

main.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'''
22
@Author: shubham shirke
3-
@Date: 2021-02-13 12:30:30
3+
@Date: 2023-06-12 10:30:30
44
@Last Modified by: shubham shirke
5-
@Last Modified time: 2021-02-11 2:50:30
6-
@Title : To add a contact in address book.
5+
@Last Modified time: 2022-06-12 4:30:30
6+
@Title : To update existing contact in address book.
77
'''
88
from AddressBook_Service import *
99

@@ -14,14 +14,19 @@ def main():
1414
print("--Address Book System--")
1515
print("-----------------------")
1616
print("1.Add contact")
17-
print("2.Print Contact")
18-
print("3.Exit")
17+
print("2.Update Contact")
18+
print("3.Print Contact")
19+
print("4.Exit")
1920
print("-----------------------")
2021
choice = int(input("Enter choice: "))
2122
if choice == 1:
2223
address_book.add_contact()
2324

2425
elif choice == 2:
26+
first_name = input("Enter first name to update: ")
27+
address_book.update_contact(first_name)
28+
29+
elif choice == 3:
2530
address_book.display_contact()
2631

2732
elif choice == 3:

0 commit comments

Comments
 (0)