Skip to content

Instantly share code, notes, and snippets.

@Amber-Cloud
Amber-Cloud / weather.py
Created January 7, 2020 20:00
A program that gives current weather for a given city name (with ALPHA-2 country code).
import urllib
import json
def kelvin_to_celsius(temp):
'''
This function transforms temperature in Kelvins to Celsius
'''
return round(temp - 273.15)
def weather_search():