def ask_question(ws, question): index = 1 questions = Quizz.all_question() ws.send(new_message(questions['q_text'], "C02LLV4HS")) while index < 5: ws.send(new_message('{} - {}'.format(index, questions['q_options_{}'.format(index)]), "C02LLV4HS")) index = index + 1 return questions['q_correct_option']
def do_highscore(self, arg): Quizz.highscore()
def do_start(self, arg): quizz = Quizz(questions) quizz.start() quizz.results() quizz.correction()