Last active
June 14, 2022 16:08
-
-
Save sshehrozali/1d50bb5b11420c299aa37b776d51b84b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Goal: We want to build a phonebook application | |
| # Features: 1. Creating a Contact 2. Viewing all the Contacts | |
| phonebook = [] # Empty list of Phonebook | |
| saved = int(input("How many contacts you want to store? ")) | |
| print() # New-line | |
| # I am storing 3 contacts inside my Phonebook | |
| for i in range(saved): | |
| contact_name = input("Contact name: ") | |
| phonebook.append(contact_name) # Adding in Phonebook | |
| if (len(phonebook) < 1): | |
| print("No Contacts!") | |
| else: | |
| for j in range(j): | |
| print(f"Name: {phonebook[j]}") | |
| # print("Program ended here") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment