Quiz for loops

Python Loops Quiz

Python Loops Quiz

1. What is a loop in Python?

2. Which keyword is used for loops in Python?

3. What does the while loop do?

4. What is the output of: for i in range(3): print(i)

5. What does range(2, 10, 2) produce?

6. What does the break statement do?

7. What does the continue statement do?

8. What is the default start value of range()?

9. Can we use an else block with a loop?

10. What is the output of: for i in range(5): pass

Comments

Popular posts from this blog

Topic1 :- What is Python Programming?

Topic2: -Why Python?

Topic7: What is Numpy?