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 response.status_code == 200:
        weather_info = {
            "Temperature": data["main"]["temp"],
            "Humidity": data["main"]["humidity"],
            "Wind Speed": data["wind"]["speed"]
        }
        return weather_info
    else:
        print("Failed to fetch weather data. Please check your input or try again later.")
        return None

def main():
    api_key = "YOUR_API_KEY_HERE"  # Replace with your OpenWeatherMap API key
    location = input("Enter city name or zip code: ")
    
    weather_info = get_weather(api_key, location)
    if weather_info:
        print("\nWeather Information:")
        for key, value in weather_info.items():
            print(f"{key}: {value}")
    
if __name__ == "__main__":
    main()
