Chapter 5 Quiz: Advanced Python

5 questions · 70% to pass

1. What is the purpose of __init__ in a class?

2. Which keyword is used to handle exceptions?

3. The with statement automatically closes a file after use.

4. What does the finally block do?

5. How do you import only the sqrt function from the math module?

Back to Chapter