Trying to press answer button on main page but window freezes: Python Tkinter. :         #Learning how to create a GUI
        from tkinter import *
        
        from random import randint
        
        #Naming the Tk window
        master = Tk()
        
        #Setting the size of Tk Window
        master.geometry('800x750')
        
        
        #Dictionary for the questions
        easy3 = ["Who is CEO of Apple?", "Who is the founder of Facebook?", "Who is the CEO of Google?"]
        easy3_A = ["Tim Cook", "Mark Zuckerburg", "Sundar Pichai"]
        
        #Defining some variables
        question_number = randint(0,2)
        
        global score
        
        question_index = 0
        
    #Procedure
        def callback():
            #A loading... symbol to ease a consumer's concern
            top = Toplevel(master)
            top.geometry('800x750')
            def question_label():
                question_label = Label(top, text = ('Your Question'), bg = 'light blue', font=('Times New Roman',20), highlightbackground='black', width = 25, height = 3)
                question_label.place(x=215,y=125)
                question_label.pack
            def question_text():
                question_text = Label(top, text = easy3[question_number], bg = 'light blue', font=('Times New Roman',16), highlightbackground='black', width = 25, height = 3)
                question_text.place(x=250,y=300)
                question_text.pack
            def answer():
                score = 0
                answer = input('Answer: ')
                if answer == easy3_A[question_number]:
                    print('Correct!')
                    score = score `enter code here`+ 1
                    print('Score = ',score)
                    
                else:
                    print('Wrong!')
                    print('GAME OVER!')        
            top.configure(background = 'light blue')
            image = PhotoImage(file="STEM_1_final.gif")
            w = Label(top, image=image)
            w.place(x=1,y=1)
            image_2 = PhotoImage(file="STEM_2_final.gif")
            c = Label(top, image=image_2)
            c.place(x=750,y=1)
            image_3 = PhotoImage(file="STEM_3_final.gif")
            a = Label(top, image=image_3)
            a.place(x=1,y=700)
            image_4 = PhotoImage(file="STEM_4_final.gif")
            d = Label(top, image=image_4)
            d.place(x=750,y=700)
            top.title('Question #1')
            b = Button(text="Answer", command=answer)
            b.pack()
            b.place(relx=.5, rely=.9, anchor=CENTER)
            question_text()                                          
            question_label()
            mainloop()
        
        
        
        def main_content():
            #A procedure to create and display the title
            
            title_label = Label(master, text = 'Can You Beat the Compu-tition?', bg = 'light blue', font=('Times New Roman',40), highlightbackground='black', width = 25, height = 3)
            title_label.pack()
        
        #Making the background of window light blue
        master.configure(background = 'light blue')
        
        #Titling the window, "Can you beat the Compu-tition?"
        master.title('Can You Beat the Compu-tition?')
        
        #Creating the button, and positioning it
        b = Button(text="Next Page", command=callback,)
        b.pack()
        b.place(relx=.5, rely=.75, anchor=CENTER)
        
        #Invoking the procedure to display the title
        main_content()
        
        #Uploading all photos for the user interface
        image = PhotoImage(file="STEM_1_final.gif")
        w = Label(master, image=image)
        w.place(x=1,y=1)
        image_2 = PhotoImage(file="STEM_2_final.gif")
        c = Label(master, image=image_2)
        c.place(x=750,y=1)
        image_3 = PhotoImage(file="STEM_3_final.gif")
        a = Label(master, image=image_3)
        a.place(x=1,y=700)
        image_4 = PhotoImage(file="STEM_4_final.gif")
        d = Label(master, image=image_4)
        d.place(x=750,y=700)
        image_5 = PhotoImage(file="STEM_5_final.gif")
        e = Label(master, image=image_5)
        e.place(x=400,y=350, anchor=CENTER)
        
        #Creating, displaying, positioning, and centering the slogan label
        slogan = Label(master, text = 'A Trivia Game In The STEM Field', bg = 'light blue',font=('Times New Roman',15))
        slogan.place(x=400,y=160, anchor=CENTER)
        
        
        
    
        #Making this whole piece of code specific to the Tkinter window run
        mainloop()

Answer button on Main page is not working if you press it. The window just says not responding. I dont know what mode to use for the user to input their answer for the question. If you want to input the answer to the question, go to the Python Shell.

