You are on page 1of 1

Club Activity Quiz 1

1. What is Python?
2. How do you create a variable in Python?
3. What is the difference between '==' and '!=' in Python?
4. Explain the difference between lists and tuples in Python.
5. How do you comment out multiple lines of code in Python?
6. What is the purpose of the `if` statement in Python?
7. How do you define a function in Python?
8. Explain the purpose of the `for` loop in Python.
9. What is the difference between `range()` and `xrange()` in Python 2?
10. How do you open and read a file in Python?
11. What is a dictionary in Python, and how do you create one?
12. How do you check the length of a list in Python?
13. What is the difference between `append()` and `extend()` methods for lists?
14. Explain the purpose of the `try` and `except` blocks in Python.
15. How do you raise an exception in Python?
16. What is the difference between a local and global variable in Python?
17. How do you define a class in Python?
18. What is inheritance in Python?
19. How do you import a module in Python?
20. Explain the difference between '==' and 'is' for comparing objects in Python.
21. How do you remove an item from a list in Python?
22. What is a lambda function in Python?
23. How do you create a virtual environment in Python?
24. Explain the purpose of the `__init__` method in a class.
25. How do you use list comprehensions in Python?

You might also like