Weather Forcasting

Weather Forecasting

Description

This snippet of code will show city weather forcasting update for next 3 days.

Requirements

$ pip install requests

Steps To Execute

  • Fork this repo and navigate to ShortenLinks folder
  • Run this code.py $ python code.py
  • Enter the city name for which you need to know weather forcasting.
  • Boom !!! you will see beautiful summary of weather forcasting for next 3 days of inputed city name.
  • Feel Free to modifiy code snippet for enchancing the user experience and utility.

Code Output

op

Source Code: code.py

import requests

city = input("\nEnter the city name : ")
url = "https://wttr.in/{}".format(city)
try:
    res = requests.get(url)
    print(res.text)
except:
    print("Error occure Please try again later...")