![]() You should only be using incomedict and expensedict instead of maintaining four names and expense/income lists. If you're on Python 3.6+ then look into f-strings as well. A more flexible data design might look like this: Entry =. You can cut about half your code by more fully leveraging this.Ĭurrently, each of the two have a list of values, a list of labels, a sum variable, a prompt function, a "check", and a sum function. Income and expenses are the same thing, just with different signs. the class and its methods would benefit from having detailed documentation stringsĪs a side note, take a look at the The Architecture of Open Source Applications project - it is really pure informational gold in terms of designing, thinking and development of your software project.The class itself feels overloaded - this may be because it does two different not-directly related things at the same time - prompting the user and making budget calculations - since you are going to continue to develop the class - make sure Application is not becoming a God Object The following code block can be removed (unless you have it there as a stub for future development): else: variable naming - there are some poor variable names like x or k - consider renaming them to something more descriptive.keep two blank lines between the imports and the class definition, after the class code and the if _name_ = '_main_' line.() after the class Application can be omitted. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |