🧠 Why I Made This
As part of my Python learning journey, I decided to build a practical mini project to apply the concepts I've learned so far — like lists, dictionaries, loops, and conditionals.
This Personal Contact Manager was built after completing the Python Intermediate course.
💡 Project Description
This is a simple terminal-based contact manager that allows the user to:
- Add new contacts
- Search for a contact by name
- Delete contacts
- View all saved contacts
Each contact is stored as a dictionary with "name"
and "number"
keys inside a list.
🧪 Features Implemented
- Menu-driven interface using
while True
- Data stored in memory using a list of dictionaries
- Search and delete using
for-else
pattern - Graceful handling of edge cases (like empty contact list)
🧾 Code - Version 1.0
contacts = []
def show_menu():
print("\n=====Contacts Manager ver 1.0=====")
print("1. Add contact")
print("2. Search contact")
print("3. Delete contact")
print("4. View all contacts")
print("5. Exit")
while True: #TODO
show_menu()
choice = input("Choose an option (1-5) : ")
if choice == "1":
name = input("Enter a name : ")
number = input("Enter a number : ")
contact = ({"name": name, "number": number}) #OOPS
contacts.append(contact)
print(f"{contact} has been added!")
elif choice == "2":
if len(contacts) < 1:
print("No contacts available")
else:
name = input("Enter a name to search : ") #Try 'for-else'
for contact in contacts: #OOPS
if contact['name'] == name:
print(f"{contact}") #BUG
break
else:
print("Incorrect name!")
elif choice == "3":
if len(contacts) < 1:
print("There are no contacts to show")
else:
name = input("Enter a name to delete : ")
for contact in contacts:
if contact['name'] == name: #TODO
choice_d = input("Do you really want to delete?[y/n] : ")
if choice_d == "y":
print(f"{contact} has been deleted!") #BUG
contacts.remove(contact) #BUG
break
elif choice_d == "n":
break
else:
print("Incorrect choice")
break
else:
print("Incorrect name")
elif choice == "4":
if len(contacts) < 1:
print("There are no contacts to show")
else:
for contact in contacts:
print(f"{contact}")
elif choice == "5":
print("Goodbye!")
break
✅ AI Feedback (ver 1.0 Review)
Category | Evaluation |
---|---|
Feature Completeness | ⭐⭐⭐⭐⭐ |
Code Structure | ⭐⭐⭐⭐☆ (function modularization possible) |
Self-Annotation | ⭐⭐⭐⭐⭐ (excellent use of #OOPS, #BUG) |
UX Consideration | ⭐⭐⭐⭐☆ (friendly but could improve formatting) |
Suggestions | Improve output format, handle invalid inputs, move to OOP or file I/O next |
Quote from my AI mentor:
"This is exactly how a real programmer grows — make it work, then make it better."
🔜 What’s Next? (Version 1.1 Preview)
- Format the output to be more user-friendly (e.g.,
Name:
,Number:
) - Add input validation (
isdigit()
,strip()
) - Save/load contacts using file I/O
- Optionally refactor to a Class-based (OOP) version
✅ Summary
This is my first Python mini project, and I learned a lot by actually building something!
I'm excited to improve this further and apply feedback step-by-step in upcoming versions.
💬 Feedback Welcome!
If you have ideas or suggestions, I'd love to hear them.
Stay tuned for ver 1.1 soon!