예제 #1
0
 def handleWrong(self):
     if freakingmath.check_answer(self.num1, self.num2, self.sign, self.answer, False):
         self.increaseScore()
         self.correctSound.play()
     else:
         self.resetScore()
         self.incorrectSound.play()
     self.getRandomMathProblem()
     self.repaint()
예제 #2
0
 def handleCorrect(self):
     if freakingmath.check_answer(self.tr, True):
         self.increaseScore()
         self.correctSound.play()
     else:
         self.resetScore()
         self.incorrectSound.play()
     self.getRandomMathProblem()
     self.repaint()