import tkinter as Tk

from tkinter.messagebox import *

def show_answer():
    Ans = int(num1.get()) + int(num2.get())
    ans.set(Ans)

    lsum["text"] = "The sum is: " + str(ans)
    Entry(main,  text = "%s" %(ans) ).grid(row=2, column=1)


main = Tk()
Label(main, text = "Enter Num 1:").grid(row=0)
Label(main, text = "Enter Num 2:").grid(row=1)
Label(main, text = "The Sum is:").grid(row=2)


num1 = Entry(main)
num2 = Entry(main)
blank = Entry(main)


num1.grid(row=0, column=1)
num2.grid(row=1, column=1)
blank.grid(row=2, column=1)


Button(main, text='Quit', command=main.quit).grid(row=4, column=0, sticky=W, pady=4)
Button(main, text='Show', command=show_answer).grid(row=4, column=1, sticky=W, pady=4)

lsum = Tk.Label(master, text = 'The sum is:')
lsum.grid(row=5, column=1, sticky=W, pady=4)

mainloop()
