我想将变量Overall
从ScreenOne
转移到ScreenTwo
。这可能吗?
class ScreenOne(Screen):
def __init__(self,**kwargs):
super (ScreenOne,self).__init__(**kwargs)
x = random.randint(3,3)
random_question = Questions[x][0]
self.ans = Questions[x][5]
self.Overall = 0
class ScreenTwo(Screen):
def __init__(self,**kwargs):
super (ScreenTwo,self).__init__(**kwargs)
x = random.randint(0,99)
random_question = Questions[x][0]
self.ans = Questions[x][5]
self.Overall = ScreenOne.Overall