
from tkinter import *

def callback1(): # we got here when we pushed a button



    aa= e.get() # our text is just sitting in the text box so go 'get' it
    bb = e2.get()   # e and e2 are the names of the boxes
                        # the part after the dot is the method   'get'


    cc= e3.get()
    dd= e4.get()
   # aa= aa+ bb +cc+dd
##    aa=int(aa)
##    bb=int(bb)
##    cc=int(cc)
##    dd=int(dd)
    print (aa+bb+cc+dd)

    if aa =="cat":
        print ("You are correct - you must have E.S.P")
    else:
        print ("Keep guessing")

master = Tk()

e = Entry(master)
e.pack()

e.focus_set()


e2 = Entry(master)
e2.pack()

e2.focus_set()


e3 = Entry(master)
e3.pack()

e3.focus_set()

e4 = Entry(master)
e4.pack()

e4.focus_set()
   

b = Button(master, text="push here ", width=30, command=callback1) # goto callback1
b.pack()

# this widget is a Label
#  w is an instance of the Label object
# an instance is created from a blueprint called a class

w = Label(master, text=" This is a Label Widget ")
w.pack()

someVar="A Label widget was used to make this - this allows output (you cannot input anything here)"
w2 = Label(master, text=someVar)
w2.pack()

mainloop()
