Y 20 Width 220 Height 30)
Y 20 Width 220 Height 30)
Y 20 Width 220 Height 30)
tk = Tk()
tk.geometry('260x370')
value = StringVar()
value1 = 0.0
valueFinal = StringVar()
operation = StringVar()
def BC_click():
ent.delete(0 'end')
def B1_click():
ent.insert(END '1')
def B2_click():
ent.insert(END '2')
def B3_click():
ent.insert(END '3')
def B4_click():
ent.insert(END '4')
def B5_click():
ent.insert(END '5')
def B6_click():
ent.insert(END '6')
def B7_click():
ent.insert(END '7')
def B8_click():
ent.insert(END '8')
def B9_click():
ent.insert(END '9')
def Multiply_click():
global value1
1
global operation
value1 = value.get()
operation = 'multiply'
ent.delete(0 'end')
def Divide_click():
global value1
global operation
value1 = value.get()
operation = 'divide'
ent.delete(0 'end')
def Minus_click():
global value1
global operation
value1 = value.get()
operation = 'minus'
ent.delete(0 'end')
def Plus_click():
global value1
global operation
value1 = value.get()
operation = 'plus'
ent.delete(0 'end')
def Point_click():
ent.insert(END '.')
def Equals_click():
global value1
global operation
a = oat(value1)
b = oat(ent.get())
ent.delete(0 'end')
if (operation == 'multiply'):
ent.insert(END a*b)
2
fl
fl
ent.insert(END a+b)
ent.insert(END a-b)
else:
ent.insert(END a/b)
B0 = Button(text="0" font="14").place(x=20
y=300 width=100 height=40)
tk.mainloop()