1 minute 1 phone with Chatgpt 1 pc with Pycharm installed 1 copy, 1 paste 5 minutes of editing
The codes so short I can add it here (or feel free to look at the git page):
import tkinter as tk from tkinter import messagebox
class BudgetTracker: def init(self, master): self.master = master self.master.title("Budget Tracker")
self.balance = 0.0
self.balance_label = tk.Label(master, text=f"Balance: ${self.balance:.2f}")
self.balance_label.pack(pady=10)
self.amount_entry = tk.Entry(master)
self.amount_entry.pack(pady=5)
self.add_button = tk.Button(master, text="Add Income/Expense", command=self.add_transaction)
self.add_button.pack(pady=5)
def add_transaction(self):
try:
amount = float(self.amount_entry.get())
transaction_type = messagebox.askquestion("Transaction Type", "Is it an income?")
if transaction_type == "yes":
self.balance += amount
else:
self.balance -= amount
self.update_balance_label()
except ValueError:
messagebox.showerror("Error", "Please enter a valid number.")
def update_balance_label(self):
self.balance_label.config(text=f"Balance: ${self.balance:.2f}")
if name == "main": root = tk.Tk() app = BudgetTracker(root) root.mainloop()
Built With
- chatgpt
- python
- tinker

Log in or sign up for Devpost to join the conversation.