from tkinter import *
root = Tk()
root.geometry('555x444')
root.title('this is calculator')
def calculator():
Valueing = values.get()
results.set(eval(Valueing))
Label(root, text='Calculate Here').pack()
values = StringVar()
Entry(root, textvariable=values).pack()
Button(root, text='Calculate!', font='lucida 13 bold' , bg='#f50e5d', fg='white', padx='20', pady='10', command=calculator).pack(pady='30')
Label(root, text='Result').pack()
results = StringVar()
Entry(root, textvariable=results).pack()
root.mainloop()
Basic Gui Calculator In Tkinter Python
September 14, 2022
0
Tags


If you have any doubts, please let me know