Rename bad variable names
This commit is contained in:
parent
357baf0b57
commit
55fdfc2c8d
@ -13,16 +13,16 @@ base_url = "https://api.openweathermap.org/data/2.5/weather?"
|
|||||||
complete_url = base_url + "appid=" + api_key + "&q=" + city_name
|
complete_url = base_url + "appid=" + api_key + "&q=" + city_name
|
||||||
response = requests.get(complete_url)
|
response = requests.get(complete_url)
|
||||||
|
|
||||||
x = response.json()
|
data = response.json()
|
||||||
|
|
||||||
if x["cod"] != "404":
|
if data["cod"] != "404":
|
||||||
|
|
||||||
y = x["main"]
|
info_main = data["main"]
|
||||||
current_temperature = y["temp"]
|
info_weather = data["weather"]
|
||||||
current_pressure = y["pressure"]
|
current_temperature = info_main["temp"]
|
||||||
current_humidity = y["humidity"]
|
current_pressure = info_main["pressure"]
|
||||||
z = x["weather"]
|
current_humidity = info_main["humidity"]
|
||||||
weather_description = z[0]["description"]
|
weather_description = info_weather[0]["description"]
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print(Columns([
|
print(Columns([
|
||||||
|
Loading…
Reference in New Issue
Block a user