Practice: Count Steps#

For each of the following code block, count the number of steps using the rules we have shown in the previous slide.

Question 0#

print(1 + 2)

for i in range(25):
    print(i)
    print(i * 2)

print(2 + 3)

Your Task

Write your answer down in your own space.

Question 1#

for i in range(42):
    print(i)

for i in range(20):
    print(1 + 2)
    print(i ** 2)

print(1)
print(2)
print(3)

Your Task

Write your answer down in your own space.

Question 2#

for i in range(10):
    for j in range(20):
        print(i * j)
        print(i ** j)

Your Task

Write your answer down in your own space.