Archive

Posts Tagged ‘script’

Python : Expenditure App

November 27, 2018 3 comments



Expenditure Application


The Menu:

Continuing parts of the Expenditure Application, here is the basic menu that we will use in our app. We will select (9) as Exit from the system.

So now, we have a json file with sample data and stored in a directory, also we have a file called “expen.py” and we will write the menu def in it and save it.


def the_menu(): # This is a menu

print(‘1. Add New Entry.’)

print(‘2. Delete an Entry.’)

print(‘3. Change an Entry.’)

print(‘4. Show Total Expenditure in a Year.’)

print(‘5. Show Expenditure Details in a year.’)

print(‘9. Exit.’)

# This line will ask the user to enter the operation he want to do.

choice = input(‘What you want to do? ‘)

return choice




In this app we will have 5 functions as our menu and maybe one or two functions to facilitate some calculations in background.


Follow me on Twitter … Click here

Advertisements