class question:
    def __init__(self, base, answer):
        self.base = base
        self.answer = answer


question_base = [
    "Dynamic code is code that has inputs and outputs that can change?\n (t) True\n (f) False\n\n",
    "What is the keyword for defining a function in Python?\n (a) def()\n (b) fun()\n (c) proc()\n\n",
    "In Jupyter Notebooks the Input is in line with the Output?\n (t) True\n (f) False\n\n",
    "What is grouping often used commands called?\n (a) Bundle\n (b) Procedural Abstraction (c) Group\n\n",

]

question_bank = [
    question(question_base[0], "t"),
    question(question_base[1], "a"),
    question(question_base[2], "f"),
    question(question_base[3], "b"),
]


def run_test(question_bank):
    score = 0
    for question in question_bank:
        rsp = input(question.base)
        if rsp.lower().strip() == question.answer:
            score += 1
    print("You got " + str(score)+" out of " + str(len(question_bank)) + " questions correct.")


run_test(question_bank)
You got 0 out of 4 questions correct.