from question_model import Question
from data import question_data
from quiz_brain import QuizBrain

# Create a question bank
question_bank = []

for question in question_data:
    text = question["text"]
    answer = question["answer"]
    new_question = Question(text, answer)
    question_bank.append(new_question)

# Present Questions
quiz = QuizBrain(question_bank)
while quiz.still_has_questions():
    quiz.next_question()

# Give final score
print(f"You've completed the quiz! \nYour final score is: {quiz.user_score}/{quiz.question_number}")