import requests


def get_forecast(lat, long):
    url = "http://api.openweathermap.org/data/2.5/forecast?lat={}&lon={}&appid=069534b1ec587bcf6f7d5a10119e075d".format(
        lat, long)
    print(url)
    response = requests.get(url)
    observation = response.json()
    location = observation['city']
    loc_name = location['name']
    loc_lat = location['coord']['lat']
    loc_lon = location['coord']['lon']
    time = []
    status = []
    detailed_status = []
    temp = []
    temp_min = []
    temp_max = []
    humidity = []
    results = []
    for forecast in observation["list"]:
        time.append(forecast['dt_txt'])
    for forecast in observation["list"]:
        for i in forecast['weather']:
            status.append(i['main'])
    for forecast in observation["list"]:
        for i in forecast['weather']:
            detailed_status.append(i['description'])
    for forecast in observation["list"]:
        temp.append(((int)(forecast['main']['temp'])-273))
        temp_min.append((int)(forecast['main']['temp_min'])-273)
        temp_max.append((int)(forecast['main']['temp_max'])-273)
        humidity.append(forecast['main']['humidity'])

    for i in range(0,40):
        results.append("""
        Location : {} Lat : {} Long : {}
        Time : {}
        Status : {}
        Detailed Status : {}
        Temperature : {}
        Min Temperature : {}
        Max Temperature : {}
        Humidity : {}
        """.format(loc_name, loc_lat, loc_lon, time[i], status[i], detailed_status[i], temp[i], temp_min[i], temp_max[i], humidity[i]))
    return "".join(results[:10])

if __name__ == '__main__':
    print(get_forecast(26,45))

2bd3080ec207e1f2a5378f5551f9fec10142c3e4
<mask token>

<mask token>


def get_forecast(lat, long):
    url = (
        'http://api.openweathermap.org/data/2.5/forecast?lat={}&lon={}&appid=069534b1ec587bcf6f7d5a10119e075d'
        .format(lat, long))
    print(url)
    response = requests.get(url)
    observation = response.json()
    location = observation['city']
    loc_name = location['name']
    loc_lat = location['coord']['lat']
    loc_lon = location['coord']['lon']
    time = []
    status = []
    detailed_status = []
    temp = []
    temp_min = []
    temp_max = []
    humidity = []
    results = []
    for forecast in observation['list']:
        time.append(forecast['dt_txt'])
    for forecast in observation['list']:
        for i in forecast['weather']:
            status.append(i['main'])
    for forecast in observation['list']:
        for i in forecast['weather']:
            detailed_status.append(i['description'])
    for forecast in observation['list']:
        temp.append(int(forecast['main']['temp']) - 273)
        temp_min.append(int(forecast['main']['temp_min']) - 273)
        temp_max.append(int(forecast['main']['temp_max']) - 273)
        humidity.append(forecast['main']['humidity'])
    for i in range(0, 40):
        results.append(
            """
        Location : {} Lat : {} Long : {}
        Time : {}
        Status : {}
        Detailed Status : {}
        Temperature : {}
        Min Temperature : {}
        Max Temperature : {}
        Humidity : {}
        """
            .format(loc_name, loc_lat, loc_lon, time[i], status[i],
            detailed_status[i], temp[i], temp_min[i], temp_max[i], humidity[i])
            )
    return ''.join(results[:10])


<mask token>

<mask token>


def get_forecast(lat, long):
    url = (
        'http://api.openweathermap.org/data/2.5/forecast?lat={}&lon={}&appid=069534b1ec587bcf6f7d5a10119e075d'
        .format(lat, long))
    print(url)
    response = requests.get(url)
    observation = response.json()
    location = observation['city']
    loc_name = location['name']
    loc_lat = location['coord']['lat']
    loc_lon = location['coord']['lon']
    time = []
    status = []
    detailed_status = []
    temp = []
    temp_min = []
    temp_max = []
    humidity = []
    results = []
    for forecast in observation['list']:
        time.append(forecast['dt_txt'])
    for forecast in observation['list']:
        for i in forecast['weather']:
            status.append(i['main'])
    for forecast in observation['list']:
        for i in forecast['weather']:
            detailed_status.append(i['description'])
    for forecast in observation['list']:
        temp.append(int(forecast['main']['temp']) - 273)
        temp_min.append(int(forecast['main']['temp_min']) - 273)
        temp_max.append(int(forecast['main']['temp_max']) - 273)
        humidity.append(forecast['main']['humidity'])
    for i in range(0, 40):
        results.append(
            """
        Location : {} Lat : {} Long : {}
        Time : {}
        Status : {}
        Detailed Status : {}
        Temperature : {}
        Min Temperature : {}
        Max Temperature : {}
        Humidity : {}
        """
            .format(loc_name, loc_lat, loc_lon, time[i], status[i],
            detailed_status[i], temp[i], temp_min[i], temp_max[i], humidity[i])
            )
    return ''.join(results[:10])


if __name__ == '__main__':
    print(get_forecast(26, 45))

import requests


def get_forecast(lat, long):
    url = (
        'http://api.openweathermap.org/data/2.5/forecast?lat={}&lon={}&appid=069534b1ec587bcf6f7d5a10119e075d'
        .format(lat, long))
    print(url)
    response = requests.get(url)
    observation = response.json()
    location = observation['city']
    loc_name = location['name']
    loc_lat = location['coord']['lat']
    loc_lon = location['coord']['lon']
    time = []
    status = []
    detailed_status = []
    temp = []
    temp_min = []
    temp_max = []
    humidity = []
    results = []
    for forecast in observation['list']:
        time.append(forecast['dt_txt'])
    for forecast in observation['list']:
        for i in forecast['weather']:
            status.append(i['main'])
    for forecast in observation['list']:
        for i in forecast['weather']:
            detailed_status.append(i['description'])
    for forecast in observation['list']:
        temp.append(int(forecast['main']['temp']) - 273)
        temp_min.append(int(forecast['main']['temp_min']) - 273)
        temp_max.append(int(forecast['main']['temp_max']) - 273)
        humidity.append(forecast['main']['humidity'])
    for i in range(0, 40):
        results.append(
            """
        Location : {} Lat : {} Long : {}
        Time : {}
        Status : {}
        Detailed Status : {}
        Temperature : {}
        Min Temperature : {}
        Max Temperature : {}
        Humidity : {}
        """
            .format(loc_name, loc_lat, loc_lon, time[i], status[i],
            detailed_status[i], temp[i], temp_min[i], temp_max[i], humidity[i])
            )
    return ''.join(results[:10])


if __name__ == '__main__':
    print(get_forecast(26, 45))

import requests


def get_forecast(lat, long):
    url = "http://api.openweathermap.org/data/2.5/forecast?lat={}&lon={}&appid=069534b1ec587bcf6f7d5a10119e075d".format(
        lat, long)
    print(url)
    response = requests.get(url)
    observation = response.json()
    location = observation['city']
    loc_name = location['name']
    loc_lat = location['coord']['lat']
    loc_lon = location['coord']['lon']
    time = []
    status = []
    detailed_status = []
    temp = []
    temp_min = []
    temp_max = []
    humidity = []
    results = []
    for forecast in observation["list"]:
        time.append(forecast['dt_txt'])
    for forecast in observation["list"]:
        for i in forecast['weather']:
            status.append(i['main'])
    for forecast in observation["list"]:
        for i in forecast['weather']:
            detailed_status.append(i['description'])
    for forecast in observation["list"]:
        temp.append(((int)(forecast['main']['temp'])-273))
        temp_min.append((int)(forecast['main']['temp_min'])-273)
        temp_max.append((int)(forecast['main']['temp_max'])-273)
        humidity.append(forecast['main']['humidity'])

    for i in range(0,40):
        results.append("""
        Location : {} Lat : {} Long : {}
        Time : {}
        Status : {}
        Detailed Status : {}
        Temperature : {}
        Min Temperature : {}
        Max Temperature : {}
        Humidity : {}
        """.format(loc_name, loc_lat, loc_lon, time[i], status[i], detailed_status[i], temp[i], temp_min[i], temp_max[i], humidity[i]))
    return "".join(results[:10])

if __name__ == '__main__':
    print(get_forecast(26,45))
