<reponame>njiang6/quiz
class QuizBrain:
    def __init__(self, a_list):
        self.question_number = 0
        self.question_list = a_list
        self.score = 0

    def still_has_questions(self):
        """Checks if their still have more questions"""
        if self.question_number < 12:
            """Checks if their still have more questions"""
            return True
        else:
            return False

    def next_question(self):
        """Displays the question"""
        current_question = self.question_list[self.question_number]
        self.question_number += 1
        user_answer = input(f"Q.{self.question_number}: {current_question.question} (True/False): ")
        self.check_answer(user_answer, current_question.answer)

    def check_answer(self, user_answer, correct_answer):
        """Checks if the answer is correct"""
        if user_answer.capitalize() == correct_answer:
            self.score += 1
            print("Correct!")
        else:
            print("Incorrect.")
        print(f"The correct answer was: {correct_answer}.")
        print(f"Your current score is: {self.score}/{self.question_number}")
        print("\n")

class QuizBrain:
    def __init__(self, a_list):
        self.question_number = 0
        self.question_list = a_list
        self.score = 0

    def still_has_questions(self):
        """Checks if their still have more questions"""
        if self.question_number < 12:
            """Checks if their still have more questions"""
            return True
        else:
            return False

    def next_question(self):
        """Displays the question"""
        current_question = self.question_list[self.question_number]
        self.question_number += 1
        user_answer = input(f"Q.{self.question_number}: {current_question.question} (True/False): ")
        self.check_answer(user_answer, current_question.answer)

    def check_answer(self, user_answer, correct_answer):
        """Checks if the answer is correct"""
        if user_answer.capitalize() == correct_answer:
            self.score += 1
            print("Correct!")
        else:
            print("Incorrect.")
        print(f"The correct answer was: {correct_answer}.")
        print(f"Your current score is: {self.score}/{self.question_number}")
        print("\n")
Checks if their still have more questions Checks if their still have more questions Displays the question Checks if the answer is correct