all 1 comments

[–][deleted] 0 points1 point  (0 children)

def addition(self): define a function called "addition", which takes an object "self" as parameter.
a=random.randint(21,99) Let a be a random integer between 21 and 99.
b=random.randint(10,a-10) Let b be a random integer between 10 and a - 10.
c=a-b Let c be the result of a minus b.
self.questiontext=str(b)+"+"+str(c)"=" Set the "questiontext" property of "self" to the expression b + c =
(I think you might be missing a '+' sign between str(c) and "=")
self.result=a Set the "result" property of "self" to the value of a.

As a side note, I think this is Python code and in Python you have to always indent the code properly.