Skip to content

Frederick-Teye/python_inheritance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

python_inheritance

I have been coding in python before leaning the basics of git and github. This is the first python program that I have already written which I want to push onto github. I did my best to make this program be like a full program for recording customers data. Currently, I am learning sqlite and by the time I am done, I will be writing a complex application than this and I will make sure I commit at every point I get to, to show that the code I have written did not come from the air or copied from somewhere.

customer.dat is a pickle file holding the data of the customers. person_and_customer.py is a file containing two classes - Person class and Customer class. Customer class is a child class of Person class. customer.py is a file containing main function and other function called by the main function that calls the methods of the classes in the person_and_customer file. All that I just said function base on the user interactions with the application.

One thing that I want to mention which is in the customer.py is that I have created functions to get first name and another function that gets last name from the user and then make the first letter of each name capital. I have done this because while I was testing the code, I used a friend who is having a compound name to test the code. His name is Omogbai-Francis. At the beginning of writing the code, I was applying .capitalize() method on the user input to make the first letter of the names capital. But I saw a downside of using that, and that is, with the name Omogbai-Francis, it will turn it into Omogbai-francis, leaving the first letter of the second name in the compound name after "-" in lower case. So I decided to create my own function which will make the first letter of the input made by the user capital if the user use a small letter, leaving the rest of the characters the way they are.

If you have any suggestions about what I could have done better, I will be glad to hear(know) it. Meaning I will be happy to get a feedback from you.

Thank you for viewing this code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages