14 прочтений · 2 года назад
Python. Работа с датами и временем
Модуль datetime Основной функционал для работы с датами и временем сосредоточен в модуле datetime в виде следующих классов: Класс date Для работы с датами воспользуемся классом date, который определен в модуле datetime. Для создания объекта date мы можем использовать конструктор date, который последовательно принимает три параметра: год, месяц и день. date(year, month, day) Например, создадим какую-либо дату: import datetime yesterday = datetime.date(2017,5, 2) print(yesterday)      # 2017-05-02...
5 лет назад
NASA continues to fight for the vitality of the Voyagers, 42 years after its launch
At the moment, the main problem of this pair of famous probes is the gradual decline in the power of their RITEGs (radioisotope thermoelectric generators), which currently produce only about 40% of the original electrical power of 470 watts (which corresponded to about 7 kW of thermal power). Their electricity is used for two purposes: to power scientific instruments, to heat them, and to heat other important parts of the instruments in the cold of deep space. 6 out of 11 scientific instruments...