This Python program utilizes the OpenWeatherMap API to fetch and display current weather information for a given city. It retrieves data such as temperature, humidity, weather description, and wind speed in metric units.
Retrieves current weather data from OpenWeatherMap API. Accepts user input for the city name. Displays temperature, humidity, weather description, and wind speed for the specified city. Handles errors gracefully in case the city is not found or there are issues with the API.
Python 3.x requests library (can be installed via pip: pip install requests) OpenWeatherMap API key (sign up at OpenWeatherMap to obtain an API key)
Run the script. Enter the name of the city for which you want to fetch the weather information. The program will display the current weather data for the specified city.
Enter city name: London Temperature: 19.89°C Humidity: 83% Weather Description: overcast clouds Wind Speed: 2.06 m/s
Ensure you have a valid API key from OpenWeatherMap and replace 'WeatherAppKey' with your own API key in the code.