Context manager use cases
Which of the following would
be a good opportunity to use a context manager?
Answer the question
A function that starts a timer that keeps track of how long some block of code takes to run.
A function that prints all of the prime numbers between 2 and some value
A function that connects to a smart thermostat so that it can be programmed remotely.
A function that prevents multiple users from updating an online spreadsheet at the same time by locking access to the spreadsheet before every operation.
Take Hint (-15xp)