Giter Site home page Giter Site logo

prognoz_pogoda's Introduction

Приложение для прогноза погоды

Для начала работы зарегистрируйтеся на: https://openweathermap.org/API и получите свой API KEY

Затем замените <ваш_API_ключ> на полученный при регистрации:

 api_key = '<ваш_API_ключ>'
 api_call = 'https://api.openweathermap.org/data/2.5/forecast?appid=' + '<ваш_API_ключ>'

Введите критерии поиска:

  • Название города или Индекс города. страна'

Программный цикл

while running:

# Запрос у пользователя название города или индекса
while True:

    # Проверка ввода
    try:
        print('Это приложение поддерживает поиск по городу (0) и поиск по почтовому индексу (1).')
        search = int(input('Пожалуйста введите 0 или 1: '))
    except ValueError:
        print("Извините, мне это не понятно.")
    else:

        # Начало проверочного теста
        if search == 0:
            city = input('Пожалуйста, введите название города: ')
            if city.lower() == 'NY':
                city = 'New York, US'

В результате вы получите:

  • Название города, индекс, дата, описание, температура по Цельсию и Фарингейту, календарь.

prognoz_pogoda's People

Contributors

viktor0680 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.