Coding quiz
Eight short programs, each with a catch that trips up beginners. Work out what each one does, then see why.
total = 0
for n in range(1, 4):
total = total + n
print(total)print("5" + "3")print(7 // 2)age = input("Age? ")
print(age + 1)score = 40
if score > 50:
print("pass")
print("done")a = [1, 2]
b = a
b.append(3)
print(a)def double(x):
print(x * 2)
result = double(4)
print(result)Answer all 8 questions to see your score.
Python basics
It finds out what you already know, starts from there, and adapts to every answer. Your first 14 days are free, no card needed.