From fb10f34e921f6688698b2d68de8d3b74d5fa496d Mon Sep 17 00:00:00 2001 From: ANKIT Date: Fri, 15 Sep 2023 16:04:38 +0530 Subject: [PATCH] Create main.py --- day34 /main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 day34 /main.py diff --git a/day34 /main.py b/day34 /main.py new file mode 100644 index 0000000..62a9c2b --- /dev/null +++ b/day34 /main.py @@ -0,0 +1,17 @@ +from question_model import Question +from data import question_data +from quiz_brain import QuizBrain +from ui import QuizInterface + +question_bank = [] +for question in question_data: + question_text = question["question"] + question_answer = question["correct_answer"] + new_question = Question(question_text, question_answer) + question_bank.append(new_question) + +quiz = QuizBrain(question_bank) +quiz_ui = QuizInterface(quiz) + +print("You've completed the quiz") +print(f"Your final score was: {quiz.score}/{quiz.question_number}")