šŸŒ¤ļø Project: Weather Data Aggregator

šŸ“š Lesson 3: Asynchronous Programming ā± 30-35 min šŸ“Š Intermediate
šŸŽÆ Objective

Simulate fetching weather data from multiple cities concurrently, then aggregate and analyze the results. This demonstrates concurrent API calls, data processing, and timeout handling.

Requirements

  1. Create a WeatherData class with city, temperature, condition, and humidity
  2. Simulate API calls with random delays (500ms-2s per city)
  3. Fetch weather for 6+ cities concurrently
  4. Implement timeout handling (3 second limit per city)
  5. Find the hottest and coldest cities
  6. Calculate average temperature
  7. Display a formatted weather report

Expected Output

Terminal
╔══════════════════════════╗
ā•‘   Weather Data Service    ā•‘
ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•

Fetching weather data for 6 cities...

āœ… New York: 22°C, Partly Cloudy (Humidity: 65%)
āœ… London: 15°C, Rainy (Humidity: 78%)
āœ… Tokyo: 28°C, Sunny (Humidity: 45%)
āœ… Sydney: 31°C, Clear Sky (Humidity: 35%)
āœ… Dubai: 38°C, Hot (Humidity: 20%)
āœ… Moscow: 8°C, Cloudy (Humidity: 72%)

╔══════════════════════════╗
ā•‘     WEATHER REPORT        ā•‘
ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•

šŸ”„ Hottest City: Dubai (38°C)
ā„ļø  Coldest City: Moscow (8°C)
šŸ“Š Average Temperature: 23.7°C
ā±ļø  Fetch Time: 1.8 seconds

šŸ’” Recommendations:
• Stay hydrated in Dubai! It's very hot.
• Bring a warm jacket to Moscow.