Trace the Code
Loop Logic
If/Else Reasoning
Debug the Idea
Vocabulary & Concepts
100

x = 5

print(x

5

100

for i in range(3):

    print(i)

0, 1, 2

100

x = 5

if x > 3:

    print("Yes")

else:

    print("No")



yes

100

print("Hello)

Missing quote 

100

What is a variable?

It stores data.

200

x = 3

x = x + 2

print(x)

5

200

for i in range(1, 5):

    print(i)

4

200

x = 2

if x == 5:

    print("Yes")

else:

    print("No")

No

200

if x = 5:

    print("Yes")

Wrong operator

200

What does a loop do?

Repeats code

300

x = 10

y = 20

x = y

y = x - 5

print(x)

20

300

x = 0

for i in range(5):

    x += i

print(x)

10

300

x = 10

if x < 5:

    print("Low")

elif x < 15:

    print("Medium")

else:

    print("High")

Medium 

300

for i in range(5)

    print(i)

Missing colon

300

What is an if statement?

A decision

400

x = 2

y = x + 4

print(y)


6

400

for i in range(2, 6):

    print(i)


4

400

x = 7

if x > 10:

    print("Big")

else:

    print("Small")


Small

400

x = 3

if x == 3:

print("Yes")


Wrong indentation

400

What does range(5) do?

Gives numbers 0 to 4

500

x = 5

y = 3

x = x - y

print(x)


2

500

x = 0

for i in range(3):

    x = x + 2

print(x)


6

500

x = 4

if x == 3:

    print("A")

elif x == 4:

    print("B")

else:

    print("C")


B

500

for i in range 5:

    print(i)


Range needs parentheses

500

What does += mean?

Add and store