Skip to content
Permalink
a5256e7a02
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
10 lines (8 sloc) 482 Bytes
import requests # This is required to include request module
city = input("So, which city you live in?:")
api_address = "http://api.openweathermap.org/data/2.5/weather?appid=bd32fd2208dbc8c9b3aa875dfd08f838&q={}&units=metric".format(
city) # https://www.youtube.com/watch?v=lcWfSn6-m_8
json_data = requests.get(api_address).json()
weather_data = json_data['main']['temp']
print("The weather in this City right know is - ")
print("The temperature is {}".format(weather_data))