The problem is that you are creating a label, and for it's value you are giving a function. You don't want to use a function as the text of the label, you want to call the function and use what the function returns for the label.
Instead of this:
self.lScore = Label(self.fTop, text=self.getRandomNumber)
... you need to do this:
self.lScore = Label(self.fTop, text=self.getRandomNumber())
Also, if getRandomNumber
is to be a method, you need to defined it to have the parameter self
, as in the following example:
class randomNumberApp:
...
def getRandomNumber(self):
...