Drjaickal / weather-forecast-application-using-Python-Codeway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Weather Forecast App in Python

This Python script retrieves real-time weather data for any city using the OpenWeatherMap API. It provides a user-friendly interface to enter a city name and displays the current weather condition, temperature (in Fahrenheit), and humidity.

Features

  • User input for city selection
  • Accesses weather data from OpenWeatherMap API
  • Displays weather condition, temperature, and humidity
  • Clean and formatted output

Prerequisites

Instructions

  1. Obtain an API Key: Sign up for a free OpenWeatherMap account and generate your API key.
  2. Replace Placeholder: Replace the api_key variable in the code with your own API key.
  3. Run the Script: Save the script as a Python file (e.g., weather_app.py) and run it from your terminal using python weather_app.py.
  4. Enter City Name: When prompted, enter the city name for which you want weather information.

Example Usage

enter the city name: London

the weather in London is: Clouds
the temperature in London is: 54 degrees Fahrenheit
the humidity in London is: 78 percent

Contributing

Feel free to fork this repository and contribute improvements!

This could include:

  • Implementing features like displaying icons for weather conditions
  • Adding functionality to display forecast for multiple days
  • Error handling for invalid city names or API key issues

About


Languages

Language:Python 100.0%