Skip to content

RaginaPhalangae/Weather_Forecasting_Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Weather_Forecasting_Tool

Video Link: https://drive.google.com/file/d/1R6imfBd7qWSDYBCZjigrCaTryJsgIjhI/view?usp=sharing

Brief Summary of the Project:

This project is a Python script that uses the OpenWeatherMap API to retrieve and display weather information for a given city. The hand takes a city name as a command-line argument and makes an API request to obtain the weather data. It then parses the JSON response to extract relevant information such as temperature, humidity, wind speed, weather description, sunrise time, and sunset time. The script includes a function kelvin_to_celsius_to_fahrenheit to convert temperature from Kelvin to Celsius and Fahrenheit. The retrieved weather data is displayed in both Celsius and Fahrenheit units.

The script handles potential exceptions, such as unsuccessful API requests, errors in parsing the JSON response, and missing data fields. It provides appropriate error messages in cases of exceptions.

To run the script, the user must provide a city name as a command-line argument. If no argument is provided, a message requesting a city name is displayed

How to use it:

Open the command prompt (cmd) on your computer.

Navigate to the directory where you saved the show_weather.py file using the cd command. For For example, if the file is saved on the desktop, use the following command

cd C:\Users\YourUsername\Desktop

Once you are in the correct directory, you can Execute the code by running the following command:

python weather.py city_name

Replace city_name with the name of the city for which you want to get the weather information.

Press Enter to run the command.

PPT Link: https://docs.google.com/presentation/d/1u-66EhJpnLYQsaQUF20DldENm_e3NaUn/edit?usp=sharing&ouid=111922014053970482146&rtpof=true&sd=true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages