I'm about to finish my math-game made in python but I get error code that "num 1 & num2 are not defined, this is the last part of my python course and only this is hindering me from finishing it so I'm very thankful for all the help I can recive. Number is the int that is determined in the reveal function and in the reveal function is adding one try and based on that giving the message if it's right or wrong. The problem is everything works besides the main-functions which is the multiplication. I've removed the widgets since they are not important to solve this I reckon. 

```
from Tkinter import *
import random
number = num1 * num2
num1= random.randint(1, 15)
global num1
num2 = random.randint(1, 15)
global num2
forsok = 0
class Application(Frame):

def quit(self):
    global root
    root.destroy()

def reset(self):
    self.name_ent.delete(0, END)
    self.gissa_ent.delete(0, END)
    self.display1_txt.delete(1.0,END)
    self.display2_txt.delete(1.0,END)
    self.display3_txt.delete(1.0,END)
    self.display4_txt.delete(1.0,END)

def reveal(self):
    global forsok
    name = self.name_ent.get()
    gissa = self.gissa_ent.get()
    if int(gissa) != int(number):
        result_msg = "Tyvärr det är fel!!"
        forsok += 1
    if int(gissa) == int(number):
        result_msg = "Du gissade rätt!!Grattis du vann!"
        forsok += 1
    welcome_msg = "Välkommen " + name 
    gissa_msg = " Du svarade på: " + gissa
    forsok_msg = "Du har svarat " + str(forsok) + "gånger."
    if forsok > 3:
        welcome_msg = "Game OVER!!."
        gissa_msg = "Du har gissat för många gånger mohahaha."
        result_msg = " "
        forsok_msg = " "
    # Display visar de olika meddelanadena
    self.display1_txt.delete(0.0, END)
    self.display1_txt.insert(0.0, welcome_msg)
    self.display2_txt.delete(0.0, END)
    self.display2_txt.insert(0.0, gissa_msg)
    self.display3_txt.delete(0.0, END)
    self.display3_txt.insert(0.0, result_msg)
    self.display4_txt.delete(0.0, END)
    self.display4_txt.insert(0.0, forsok_msg)

    # Main hanteraren rootar och bestämmer storleken på fönstret
root = Tk()
root.title("Gissa Multiplikationen")
root.geometry("700x450")
app = Application(root)
root.mainloop()
root = Tk()
quit_bttn(root)
Application(root)
root.mainloop()

```

The error message is following

```
number = num1 * num2
NameError: global name 'num1' is not defined

```