Chapter 5 Quiz: Advanced Python 5 questions · 70% to pass 1. What is the purpose of __init__ in a class? To delete the object To initialize the object's attributes To print the object To define class methods 2. Which keyword is used to handle exceptions? handle catch except error 3. The with statement automatically closes a file after use. True False 4. What does the finally block do? Runs only if an exception occurs Runs only if no exception occurs Runs regardless of exceptions Skips exceptions 5. How do you import only the sqrt function from the math module? import math.sqrt from math import sqrt import sqrt from math include math.sqrt Submit Quiz Back to Chapter Back to Chapter Dashboard