Challenge: Hourly Temperature Extractor
In this challenge, you will deepen your skills in working with real-world APIs by retrieving and processing hourly temperature data for a specific location. You will use the Open-Meteo API to fetch temperature readings for Paris, France (latitude: 48.85, longitude: 2.35). The goal is to extract the hourly temperatures from the API's JSON response and print the first five values. This task will test your ability to make HTTP requests, parse JSON data, and access specific values within the data structure.
Swipe to start coding
Write a function that retrieves hourly temperature data for Paris from the Open-Meteo API and prints the first five temperature values from the response.
- The function must make an HTTP GET request to the Open-Meteo API endpoint with latitude 48.85 and longitude 2.35, requesting hourly temperature data.
- The function must extract the list of temperature values from the JSON response.
- The function must print the first five temperature values from this list.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 10
Challenge: Hourly Temperature Extractor
Свайпніть щоб показати меню
In this challenge, you will deepen your skills in working with real-world APIs by retrieving and processing hourly temperature data for a specific location. You will use the Open-Meteo API to fetch temperature readings for Paris, France (latitude: 48.85, longitude: 2.35). The goal is to extract the hourly temperatures from the API's JSON response and print the first five values. This task will test your ability to make HTTP requests, parse JSON data, and access specific values within the data structure.
Swipe to start coding
Write a function that retrieves hourly temperature data for Paris from the Open-Meteo API and prints the first five temperature values from the response.
- The function must make an HTTP GET request to the Open-Meteo API endpoint with latitude 48.85 and longitude 2.35, requesting hourly temperature data.
- The function must extract the list of temperature values from the JSON response.
- The function must print the first five temperature values from this list.
Рішення
Дякуємо за ваш відгук!
single