APCSP(S) Address Book

Below is my address book I created. I used the self, init algorithm with functions for a search followed by a while loop that holds the if statements for user options. When doing this I originally wanted to try and do a contact book in which you could add contacts to a txt file which would be able to save contacts for future. I tried to do this using pickle or shelve algorithm but I could not get around where to put the txt file so after many many tries I settled with this simple algorithm.  Then with this algorithm that I ended up using I came into a little bit of trouble when I tried to have no dedicated search choice by the user so the user can type any numbers or words. I could not get around how to search for int and string at the same time and not print invalid for one if it fails so I left it as is. Never the less, below you can see my code and a video of my code in action.

https://gist.github.com/200005/2d828661274dab58d4d6898eb81de346

FLOW CHART

 

 

 

 

 

 

 

CITATION

https://micropyramid.com/blog/understand-self-and-__init__-method-in-python-class/

V, Jagadeesh. “Understanding Self and __init__ Method in Python Class. – Micropyramid.”Python and Django Development Company, Micropyramid, 5 May 2017, micropyramid.com/blog/understand-self-and-__init__-method-in-python-class/.
https://pythontips.com/2013/08/02/what-is-pickle-in-python/

“What Is Pickle in Python ?” Python Tips, 21 July 2015, pythontips.com/2013/08/02/what-is-pickle-in-python/.
https://pymotw.com/2/shelve/

“PyMOTW.” Shelve – Persistent Storage of Arbitrary Python Objects – Python Module of the Week, pymotw.com/2/shelve/.

Leave a Reply

Your email address will not be published. Required fields are marked *