Challenge 2: Concurrent async Calls — Solution import kotlinx.coroutines.* suspend fun fetchTemperature(): Int { delay(500) return 21 } suspend fun fetchHumidity(): Int { delay(500) return 55 } fun main() = runBlocking { val temperatureDeferred = async { fetchTemperature() } val humidityDeferred = async { fetchHumidity() } val temperature = temperatureDeferred.await() val humidity = humidityDeferred.await() println("Temperature: $temperature, Humidity: $humidity") // Both async calls start immediately and run concurrently, so the // whole thing takes ~500ms total, not ~1000ms (500ms + 500ms) as it // would if fetchHumidity() only started after fetchTemperature() // finished. } /* Output: Temperature: 21, Humidity: 55 (takes roughly 500ms to run, not 1000ms) Notes: - Both async { ... } calls start their coroutines immediately when async is called, not when await() is called — await() only suspends until that specific coroutine's result is ready. - Because both delays overlap in time rather than happening one after another, the total wait is the length of the longer delay (500ms), not the sum of both (1000ms). */