79221968

Date: 2024-11-25 07:10:08
Score: 1
Natty:
Report link

def add contact():

name=input("Enter name:")

phone_number=input("Enter phone number:")

email-input("Enter email address:")

contacts (name)=("phone_number":phone_number, "email":email)

print (f"Contact(name) added successfully!")

def veiw all contacts():

if not contacts:

print("No contacts in the list.")

return

for name, info in contacts.items():

print("fName: (name)")

print (f"Phone number: {info['phone_number'])")

print (f"Email address: (info['email'])")

print("-"*20)

def search contact():

name=input("Enter name to search:")

if name in contacts:

contact_info-contacts [name]

print (f"Name: (name)")

print (f"Phone number: (contact_info['phone_number'))"} print (f"Email address: (contact_info['email']}")

else:,

print (f"Contact (name) not found.")

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: azhar lion