-1
from Tkinter import *
from tkMessageBox import *
root=Tk()
Label(root,text="first").grid(row=0)
Label(root,text="second").grid(row=2)
e1=Entry(root)
e1.grid(row=0,column=2)
e2=Entry(root)
e2.grid(row=2,column=2)
a=e1.get()
b=e2.get()
def add():
c=a+b
s=showinfo(title="answers",message='addition='+c)
那麼它打印什麼?另外,請格式化您的代碼。 – ergonaut
它應該打印c的計算值,但它不是。 –