1 · Learn and predict
Read this worked example. Predict its output, run it in Python 3, and explain how variables change.
questions = [('2 + 2?', '4'), ('Binary of 2?', '10')]
score = 0
for question, expected in questions:
# Replace the fixed response with input() later.
response = expected
if response == expected:
score += 1
print('Score:', score, 'out of', len(questions))