Python Looping or Iterative Statements Interview Questions:
1. What is for loop & can you explain about it?
2. What is while loop & can you explain about it?
3. Explain the difference between the 'for' and 'while' loop in Python.
4. How can you terminate a loop prematurely in Python?
5. What is the purpose of the 'pass' statement in Python?
6. What is the 'break' statement used for in Python?
7. Describe the 'continue' statement and its usage.
8. What is the purpose of the 'return' statement in Python?
9. What is the purpose of the 'for - else' statement in Python?
10. How can you iterate over a sequence while keeping track of the index?
11. What is the purpose of the 'assert' statement in Python?
12. Write a Python program to print all the numbers from 1 to 10.
13. Write a Python program to find the sum of all numbers from 1 to 100.
14. Write a Python program to print the multiplication table of a given number.
15. Write a Python program to print the reverse string of a given string in python.
16. Write a Python program to find the factorial of a number using a while loop.
17. Write a Python program to generate the Fibonacci sequence up to n terms.
18. Write a Python program to reverse a given integer.