Brisk
Quiz
Practice. Learn. Score.
Home
🔍
🌙
🏆
Leaderboard
Login
IT
›
Python
⏱
00:00
0/7 answered
Score: 0
🔀 Click here to get new question set
Sign up
to save this score to the leaderboard.
Question 1
What is the correct way to raise an exception in Python while re-raising it from within an "except" block, preserving the original traceback?
return exception
raise Exception()
raise
throw exception
Question 2
What is the purpose of Python's "heapq" module?
Provides functions specifically for performing advanced mathematical calculations
Provides functions used exclusively for making outgoing HTTP network requests
Provides an efficient implementation of a heap-based priority queue
Provides functions used only for reading from and writing to a file on disk
Question 3
What is the purpose of a Python "generator function", defined using the "yield" keyword?
Immediately computes and returns every value in a sequence all at once
Automatically retries a function's execution if it happens to raise an error
Produces a sequence of values lazily, one at a time, rather than all at once
Permanently converts a regular function into an entirely separate class
Question 4
What is the purpose of a "mock object" in Python testing, commonly created using the unittest.mock module?
Automatically generates a complete, brand-new set of unit tests for a given module
Measures precisely how long a specific piece of code actually took to execute
Permanently replaces a piece of production code with an entirely new implementation
Simulates the behavior of a real dependency to isolate the code under test
Question 5
What is the purpose of Python's "functools.lru_cache" decorator?
Converts a regular, synchronous function into an equivalent asynchronous coroutine
Automatically logs every single call made to that specific decorated function
Permanently limits the maximum total number of arguments a function may accept
Caches a function's previous results to avoid recomputing them for the same input
Question 6
What is the purpose of Python's "getattr()" built-in function?
Checks whether a given object currently has an attribute with a specified name
Retrieves the value of a named attribute, optionally with a fallback default
Permanently removes a specified attribute from a given object entirely
Sets a specified attribute on a given object to a newly supplied value
Question 7
What is the purpose of Python's "json" module?
Provides functions specifically for performing advanced mathematical calculations
Provides functions used only for reading from and writing to a file on disk
Encodes Python objects to JSON text, and decodes JSON text back into Python objects
Provides functions used exclusively for making outgoing HTTP network requests
🔀 Click here to get new question set
Sign up
to save this score to the leaderboard.
Share this quiz
𝕏
💬
f
in
🔗
📚 All Quizzes
Browse every category and see the full list of quizzes on BriskQuiz
→
🏠
Home
📚
Categories
🏆
Leaderboard
👤
Profile