import requests

def get_weather(api_key, location):
    url = f"http://api.openweathermap.org/data/2.5/weather?q={location}&appid={api_key}&units=metric"
    response = requests.get(url)
    data = response.json()
    if data['cod'] == 200:
        weather_info = {
            'location': data['name'],
            'temperature': data['main']['temp'],
            'humidity': data['main']['humidity'],
            'wind_speed': data['wind']['speed'],
            'description': data['weather'][0]['description']
        }
        return weather_info
    else:
        print("Error:", data['message'])
        return None

def display_weather(weather_info):
    print(f"Weather in {weather_info['location']}:")
    print(f"Temperature: {weather_info['temperature']}°C")
    print(f"Humidity: {weather_info['humidity']}%")
    print(f"Wind Speed: {weather_info['wind_speed']} m/s")
    print(f"Description: {weather_info['description']}")

def main():
    api_key = "YOUR_API_KEY"  # Replace with your OpenWeatherMap API key
    location = input("Enter city name or zip code: ")
    weather_info = get_weather(api_key, location)
    if weather_info:
        display_weather(weather_info)

if __name__ == "__main__":
    main()