Track your finances with Python: Step by Step Guide | #python #coding #programming

Akansha Yadav builds a Python expense tracker with Tkinter, adding a text entry for amounts, a dropdown menu for categories like Food and Transport, and validation that warns users if they skip required fields. The app stores expenses in a list and displays them in real time.
Chapters
Hello everyone, welcome back to my YouTube channel. In today's video, we will create expense tracker using Python. So here I'm importing the library which is tkinter library, GUI library, and I'm creating a class in which I am going to use expense tracker app. And I am creating a primary things like self.root, I'm writing title and then creating an empty list. And in this empty list, I will be adding the expenses, then adding the labels. There will be one label and then I will be taking an entry. So first is going to be the label, then I'm taking entry, then I'm creating a category label. In this category label, I will be adding a menu. So here I'm writing select category, then variable. Let's go ahead and create a select option. Now I'm going to create a menu, an option menu is going to be— I'm going to add multiple options like food, transport, shopping, and then keeping others. Then I'm packing it, indicated it's must to package in every item that you're going to add. Then adding a button which is going to be Add Expense button, then packing that button too. Then I'm take— writing a text in this text box. Everything will be visible to us. It means whatever expenses I am going to add, that will be visible in that text box. Then I am creating a function that is going to be a method as well of the class, and Add Expense, then calling each and everything and Creating a— basically now I'm creating conditions. I am writing a condition: if expense and create category is not equal to select, then what will happen? And if it is equal, then what will happen? So if it is equal, then it will show a warning that please enter an expense and select a category if you wanted to add an expense. If you wanted to update anything which is already existing one, then you can do that too in this expense tracker application which we are going to create. Now I am creating a main loop in which I am calling each and everything that we have created above. It means the root of our tkinter window and then the class that we have created. Now let's run this and see the output. So let's— okay, here we have successfully run the application. Yeah, so this is how our application looks like. So here I can enter the expense. It means basically I am going to enter the amount that I have spent and then select the category. Let's suppose shopping, and then I have to click on Add Expense button. Then second, I have to write the expense for the food. So I will write the expense now and then I will select from the category and will add expense. We'll continue. Like, basically I'm testing each and everything that I have added. Now I'm going to add it for others. Then I am going to add for one more thing, that is going to be a transportation, and then I will add expense. So here in the text box, I am able to see each and everything that I have added. It means whatever my expensive one. So if you like the video, don't forget to hit the like button and subscribe to the channel.










