def scoreEnglishAnswer(self, word): answer = self.getInputAnswer().strip() if answer.lower() == 'exit' and word != 'exit': self.printStatistics() sys.exit() if answer.lower() == word.lower(): ColorPrint.printGreen('T', end=' ') self._rightCnt += 1 else: ColorPrint.printRed('F', end=' ') self._wrongCnt += 1 ColorPrint.printBlue(word, end=' ') print('=>', answer)
def printEnglish(self, item): print(item) answer = self.getInputAnswer().strip() if answer.lower() == 'exit': sys.exit() ColorPrint.printBlue(self.combineFullChinese(item), file=self._file)