please follow my attachment

2 answer below »
Answered 13 days AfterFeb 02, 2021

Answer To: please follow my attachment

Aditya answered on Feb 16 2021
147 Votes
import tkinter
from tkinter import *
from tkinter import messagebox
from moneymanager import MoneyManager
def login(moneymanager):
root = Tk()
root.title("FedUni Money Manager")
userNumber = moneymanager.getUserNum
ber()
userBalance = moneymanager.getBalance()
def rent():
try:
amount = float(newWindowCenter.get())
moneymanager.reduce_funds(amount)
messagebox.showinfo("Caution", "Amount of rent is debited")
newWindowData.insert(1.0, str(amount) + "\n")
newWindowData.insert(1.0, "Rent\n")
moneymanager.add_entry(amount, "Rent")
except ValueError:
messagebox.showinfo("Caution", "enter a valid value for amount")
newWindowCenter.delete(0, "end")
newWindowCenter.insert(0, "")
def logout():
moneymanager.save_to_file()
root.destroy()
mainScreen()
def deposit():
try:
amount = float(newWindowCenter.get())
moneymanager.deposit_funds(amount)
messagebox.showinfo("Caution", "Amount is depsoited")
userBalance = moneymanager.getBalance()
newWindowData.insert(1.0,str(amount)+"\n")
newWindowData.insert(1.0, "Deposit\n")
moneymanager.add_entry(amount, "Deposit")
except ValueError:
messagebox.showinfo("Caution", "enter a valid value for amount")
newWindowCenter.delete(0, "end")
newWindowCenter.insert(0, "")
newWindowTitle = tkinter.Label(text="Feduni Money Manager", font="Verdana 15")
newWindowTitle.grid(row=0, column=0, columnspan=3, pady=20)
newWindowUser = tkinter.Label( text="User Number: "+str(userNumber), font="Verdana 15")
newWindowUser.grid(row=1, column=0)
newWindowBalance = tkinter.Label(text="Balance: "+str(userBalance), font="Verdana 15")
newWindowBalance.grid(row=1, column=1)
newWindowLogoutBtn = tkinter.Button( text='Log Out', compound=CENTER, font="Verdana 15 ", height=1, width=10,
command=logout)
newWindowLogoutBtn.grid(row=1, column=2)
newWindowAmount = tkinter.Label( text="Amount($)", font="Verdana 15")
newWindowAmount.grid(row=2, column=0)
newWindowCenter = tkinter.Entry()
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here