hello wellcome guy's
Again to come new project
so guys this project is comtact management create using python
so guys last time we will see that how to create Library mangement using python
so guys today is discuss
contact managrment simple python programming
Let's star:::::::-
•••••••••••••••••••••••••••••••••••••••
•••••••••••••••••••••••••••••••••••
print("•••••WELCOME TO CANTACT•••••\n")
name = []
number = []
def contact():
lis = 1
list = int(input("how many save number of line :"))
for i in range(0,list):
for j in range(0,lis):
n = input(f"{lis}.Name:")
k = int(input(f"{lis}.Phone number:"))
number.append(k)
name.append(n)
print("\n••••••••••••••••••\n")
for q,a in zip(name,number):
print("\n{0}:: {1}.\n".format(q,a))
contact()# this is function calling
def choice():
while True:
print("•••••••Choose Your Choice•••••\n")
print("1.Add a new contact")
print("2.Delete all contacts")
print("3.Display all contacts")
print("4.Search Name Number")
print("5.Exit phonebook")
ch = int(input("Enter the choice :"))
if(ch == 1):
print("Add New Number:")
na = input("New name :")
nu = input("New number :")
number.append(nu)
name.append(na)
elif(ch == 2):
print(":Youe Cintacts is delete :")
name.clear()
number.clear()
print(f"\n Delete name :{name}\nDelete number :{number}")
elif(ch == 3):
for m,o in zip(name,number):
print("\n{0}:: {1}\n".format(m,o))
elif(ch == 4):
try:
contact = input("Enter the Search name,number :")
search = int(name.index(contact))
print (f"YES !! {contact} name is available ")
except(ValueError):
# Print not found message
print
print(f"Sorry !:{contact}: number is not avialable\nplease try again.......")
elif(ch == 5):
input("Press Enter to exit,,,,")
exit()
choice()
••••••••••••••••••••••••••••••••••••••
•••••••••••••••••••••••••••••••••••
OUTPUT
guy's you will try to make best and good
so I hope this programm good for you
Comments
Post a Comment