class QuizBrain:

    def __init__(self, questions_list):
        self.question_number = 0
        self.score = 0
        self.questions_list = questions_list


    def still_has_question(self):
        return self.question_number < len(self.questions_list)

    def next_question(self):
        current_question = self.questions_list[self.question_number]
        self.question_number += 1
        user_answer = input(f"Q.{self.question_number}: {current_question.text} (True/False)?: ")
        self.check_answer(user_answer, current_question.answer)

    def check_answer(self, user_answer, question_answer):
        if user_answer.lower() == question_answer.lower():
            print("You got it right!")
            self.score += 1        
        else:
            print("That's wrong.")        
            print(f"The correct answer was: {question_answer}.")
            
        print(f"your current score is : {self.score}/{self.question_number}\n")

    def print_results(self):
        print("You have completed the quiz!")
        print(f"Your final score is: {self.score}/{self.question_number}\n")
class QuizBrain:

    def __init__(self, questions_list):
        self.question_number = 0
        self.score = 0
        self.questions_list = questions_list


    def still_has_question(self):
        return self.question_number < len(self.questions_list)

    def next_question(self):
        current_question = self.questions_list[self.question_number]
        self.question_number += 1
        user_answer = input(f"Q.{self.question_number}: {current_question.text} (True/False)?: ")
        self.check_answer(user_answer, current_question.answer)

    def check_answer(self, user_answer, question_answer):
        if user_answer.lower() == question_answer.lower():
            print("You got it right!")
            self.score += 1        
        else:
            print("That's wrong.")        
            print(f"The correct answer was: {question_answer}.")
            
        print(f"your current score is : {self.score}/{self.question_number}\n")

    def print_results(self):
        print("You have completed the quiz!")
        print(f"Your final score is: {self.score}/{self.question_number}\n")