Junior — Senior
Incorrect use of requests in asynchronous coroutines
livecode
Task condition
In this task, you need to identify what errors occur when attempting to gather weather data for multiple cities by combining asyncio and the synchronous requests library. The provided example demonstrates a common pitfall: blocking HTTP requests are executed inside an async function, causing the event loop to lose the benefits of concurrency. Explain why such code runs slowly, what exceptions might arise, and how to properly organize asynchronous API access (for example, using aiohttp or executing requests in a thread pool).