@ -30,8 +30,10 @@ with open(QUESTIONS_FILE, "r", encoding="UTF-8") as f:
# if you want to use topics 1) filter all questions with topics 2) use topic questions to construct quiz_questions (when removing service keys from all_questions dict)
# topics = ["теодолит"] # move topics to VARIABLES
# topics_questions = [q for q in all_questions if q.get("topic") in topics]
a["correct_answer"]=next(question["answer"]forquestioninall_questionsifquestion["id"]==question_id)# all_questions can be replaced with topic_questions
a["is_correct"]=a["student_answer"].casefold()==a["correct_answer"].casefold()# make sure answer is str