CATEGORY 1: Trace the Code
CATEGORY 2: Loop Logic
CATEGORY 3: If / Else Reasoning
CATEGORY 4: Debug the Idea
CATEGORY 5: Vocabulary & Concepts
100

x = 5

x = x + 3

print(x)

8

100

for i in range(3):

    print("Hi")

  hi gets repeated 3 times

100

x = 7

if x > 5:

    print("Yes")

else:

    print("No")

  Yes

100

if x = 5:

    print("Hello")

 the code uses = instead of ==

100

What is a variable?

 A named location that stores data.

200


Question 2 (Medium):

x = 10

y = x - 4

x = y + 2

print(x)

8

200

total = 0

for i in range(1, 5):

    total += i

print(total)

10

200

x = 10

if x < 5:

    print("Low")

elif x < 15:

    print("Medium")

else:

    print("High")

Medium

200

for i in range(5)

    print(i)



the colon is missing after the “for” statement

200

What does a loop do in a program?

Repeats a block of code multiple times.

300

x = 3

y = x * 2

x = y + x

print(x)

9

300

count = 0

for i in range(2, 10, 2):

    count += 1

print(count)

4

300

x = 8

y = 12

if x > 10 or y < 10:

    print("A")

else:

    print("B")

  B

300

x = 10

if x > 5:

print("Big")



the print statement is not indented

300

Loops are used to avoid writing the same code repeatedly.  

 Repeat a block of code multiple times.