Fish 1 Fish 2 Fish 3 Fish 4

Loops Challenge

1. What does this code output?

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

2. What is the output of this code?

for i in range(1, 6, 2):
    print(i)
    

3. What is the output of this code?

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

4. What does this code print?

for i in range(1, 6, 2):
    print(i)
    

5. How many times will this loop run?

count = 0
for i in range(5):
    count += 1
print(count)
    

6. What is the output of this code?

for i in range(5, 0, -1):
    print(i)
    

7. What is the output of this code?

for i in range(1, 10):
    if i % 2 == 0:
        print(i)