Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

1. Explain the difference between the if statement and the if-else statement in Python.

2. Write a Python code snippet demonstrating the use of nested if statements.

3. Describe a situation where nested if statements are useful.

4. What is an if-elif-else ladder statement?

5. Describe the purpose of the break and continue statements in Python loops.

6. How does the else block in Python loops work?

7. Explain the concept of nested loops in Python.

8. Discuss the role of the Math and Random number functions in Python loop control.

9. What are user-defined functions in Python? Explain the types of function arguments
and provide examples of each type.

10. What are the formatting capabilities of strings in Python.

11. Discuss the purpose of string comparison in Python.

12. Explain the string slicing in Python?

13. Discuss the concept of regular expressions in Python.

14. Discuss the search and replace functionality provided by regular expressions in
Python.

15. Explain the Slicing, Negative Indices, List Methods.

You might also like