Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Weather Data Analyzer | Exploring Public Data APIs
Working with APIs in Python

bookChallenge: 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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 2
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: 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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 2
single

single

some-alt