Quiz

Dictionary being used to run the quiz.

Q_Bank = {
    "Dynamic code is code that has inputs and outputs that can change?":"true",
    "What is the keyword for defining a function in Python?": "def",
    "In Jupyter Notebooks the Input is in line with the Output": "false",
    "What is grouping often used commands called?": "procedural abstraction",
}

score = 0
for Q, ans in Q_Bank.items():
    print(Q)
    rsp = input(Q)
    if rsp.lower().strip() == ans.lower().strip():
        print(f"Your answer {rsp} is the correct correct")
        score += 1
    else:
        print(f"Your answer {rsp} doesn't equal the correct answer/s which is {ans}")
print(f"Your score is {score} out of {len(Q_Bank)} points.")
Dynamic code is code that has inputs and outputs that can change?
Your answer true is the correct correct
What is the keyword for defining a function in Python?
Your answer def is the correct correct
In Jupyter Notebooks the Input is in line with the Output
Your answer false is the correct correct
What is grouping often used commands called?
Your answer grouping doesn't equal the correct answer/s which is procedural abstraction
Your score is 3 out of 4 points.