O-O/S-S Quiz: Object-Oriented Security Scripting 8 questions · 70% to pass 1. Which Python method runs automatically when you create a new object? __start__ __create__ __init__ __new__ 2. A recursive function without a base case will: Return None Run once and stop Crash with RecursionError Loop forever without error 3. socket.connect_ex() returns 0 when: The port is closed The host is unreachable The port is open A timeout occurs 4. Binary search requires the list to be sorted before it can work correctly. True False 5. Which module helps count how many times each IP appears in a list of log entries? os socket collections.Counter re 6. In OOP inheritance, class WebScanner(Scanner): means: WebScanner replaces Scanner WebScanner gets all of Scanner's methods and attributes Scanner inherits from WebScanner Both classes are independent 7. Recursive directory scanning is useful in cybersecurity because malware often hides in deeply nested folders. True False 8. What is the advantage of recursion over iteration for directory scanning? It uses less memory It is always faster The code naturally mirrors the tree structure and handles any depth It avoids PermissionError Submit Quiz Back to Chapter Back to Chapter Dashboard