Challenge: Weather Data Analyzer
In this challenge, you will use the Open-Meteo API to retrieve current weather data for Berlin and display key information. The Open-Meteo API provides weather data for any location specified by latitude and longitude. For Berlin, the latitude is 52.52 and the longitude is 13.41. Your goal is to fetch the current temperature and wind speed for Berlin and print them in a specific format. This exercise will reinforce your skills in making HTTP requests, parsing JSON responses, and extracting relevant data from APIs.
Swipe to start coding
Write a function that retrieves the current weather for Berlin using the Open-Meteo API and prints the temperature and wind speed.
- Extract the temperature and wind speed values from the API response.
- Format and print the output as:
Temperature: X°C, Wind Speed: Y m/s.
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
What is the specific format in which I should print the temperature and wind speed?
Can you provide an example of the expected output?
Do you have any tips for making HTTP requests and parsing JSON in this context?
Awesome!
Completion rate improved to 10
Challenge: Weather Data Analyzer
Swipe um das Menü anzuzeigen
In this challenge, you will use the Open-Meteo API to retrieve current weather data for Berlin and display key information. The Open-Meteo API provides weather data for any location specified by latitude and longitude. For Berlin, the latitude is 52.52 and the longitude is 13.41. Your goal is to fetch the current temperature and wind speed for Berlin and print them in a specific format. This exercise will reinforce your skills in making HTTP requests, parsing JSON responses, and extracting relevant data from APIs.
Swipe to start coding
Write a function that retrieves the current weather for Berlin using the Open-Meteo API and prints the temperature and wind speed.
- Extract the temperature and wind speed values from the API response.
- Format and print the output as:
Temperature: X°C, Wind Speed: Y m/s.
Lösung
Danke für Ihr Feedback!
single