#addition and multiplication
def sumo():
    ad=b.get()
    bd=d.get()
    addition=int(ad)+int(bd)
    k.insert(0,addition)
def prodo():
    cd=b.get()
    ed=d.get()
    product=int(cd)*int(ed)
    k.insert(0,product)
from tkinter import *
master=Tk()
var=IntVar()
a=Label(master,text="Enter the first number:")
a.grid(row=1,column=0)
b=Entry(master)
b.grid(row=1,column=1)
c=Label(master,text="Enter the seecond number:")
c.grid(row=2,column=0)
d=Entry(master)
d.grid(row=2,column=1)
e=Radiobutton(master,text="Sum",variable=var,value=1)
e.grid(row=3,column=0,sticky=W)
f=Radiobutton(master,text="Product",variable=var,value=2)
f.grid(row=3,column=1,sticky=W)
g=Button(master,text="Submit",width=30,bd=3,command=sumo)
g.grid(row=6,column=0)
v=Button(master,text="Exit",width=30,bd=3,command=master.destroy)
v.grid(row=6,column=1)
l=Label(master,text="Result")
l.grid(row=7,column=0,sticky=W)
k=Entry(master,bd=2,width=20)
k.grid(row=7,column=1,sticky=SW)
master.mainloop()
