{"id":360592,"date":"2024-05-21T00:56:16","date_gmt":"2024-05-21T00:56:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=360592"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=360592","title":{"rendered":"<span>\u0417\u043c\u0435\u0438\u043d\u0430\u044f \u043d\u0430\u0443\u043a\u0430: \u0425\u0438\u043c\u0438\u044f \u0432 Python, \u0447\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e36\/dec\/856\/e36dec8567b58b2028009b0abba94fe9.jpg\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e36\/dec\/856\/e36dec8567b58b2028009b0abba94fe9.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0410\u0440\u0433\u0435\u043d\u0442\u0443\u043c \u043d\u0430 \u0441\u0432\u044f\u0437\u0438, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0445\u0438\u043c\u0438\u0438 \u0441 \u043d\u0443\u043b\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Python. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f, \u043c\u043e\u044f \u0434\u0435\u0431\u044e\u0442\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 &#171;\u0417\u043c\u0435\u0438\u043d\u0430\u044f \u043d\u0430\u0443\u043a\u0430&#187;, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Python? \u0412 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0435 GitHub&#8217;\u0430 \u043e\u043d \u0437\u0430\u043d\u044f\u043b 2-\u0435 \u043c\u0435\u0441\u0442\u043e, \u0443\u0441\u0442\u0443\u043f\u0438\u0432 \u043c\u0435\u0441\u0442\u043e JavaScript, \u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0443\u0440\u0441\u043e\u0432 &#171;\u0421\u0442\u0430\u043d\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0437\u0430 2 \u043c\u0435\u0441\u044f\u0446\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0439 $300\u043a \u0432 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0443&#187; \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0448\u043a\u0430\u043b\u0438\u0432\u0430\u0435\u0442. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u043a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430 \u043e\u0434\u043d\u0443 \u0432\u0430\u043a\u0430\u043d\u0437\u0438\u044e Junior Python \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u0442\u044c \u0434\u043e 1000, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u0437\u0430\u044f\u0432\u043e\u043a. \u041d\u043e \u043e\u043d, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0425\u0438\u043c\u0438\u044f, \u043a\u0430\u043a \u043d\u0430\u0443\u043a\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430. \u0421 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043e\u0442\u043a\u0440\u044b\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u0445\u0438\u043c\u0438\u043a\u043e\u0432: \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f \u0432 \u043c\u0438\u0440 \u0445\u0438\u043c\u0438\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u0437\u043c\u0443 Python &#8212; \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043b \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0445\u0438\u043c\u0438\u043a\u043e\u0432 \u0432 \u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0436\u0435 \u043e\u0431\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0431\u0435\u0437 \u043d\u0438\u0445), \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Python \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c, \u043a\u0430\u043a Python \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043d\u0430\u0443\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u043c \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GitHub \u0438 Git, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0435\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f Python. \u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0432\u0430\u0448\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u0438 \u0441\u0430\u043c pip \u043d\u0435 \u0434\u0430\u0441\u0442 \u0432\u0430\u043c \u044d\u0442\u043e\u0433\u043e (<a href=\"https:\/\/peps.python.org\/pep-0668\/\" rel=\"noopener noreferrer nofollow\">PEP 668<\/a>). \u041d\u0443, \u043a\u0430\u043a \u043d\u0435 \u0434\u0430\u0441\u0442, \u0434\u0430\u0441\u0442, \u043d\u043e \u0441 \u0444\u043b\u0430\u0433\u043e\u043c &#8212;break-system-packages<\/p>\n<pre><code class=\"bash\"># \u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u043b\u044f Linux-\u0441\u0438\u0441\u0442\u0435\u043c python3 -m venv venv         # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 source venv\/bin\/activate     # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e pip3 install --upgrade pip   # \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c pip<\/code><\/pre>\n<h2>\u0422\u0435\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0448\u043a\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u0410 \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0435\u0451?<\/p>\n<h4>1. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430:<\/h4>\n<ul>\n<li>\n<p><strong>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430<\/strong> (\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u0430\u043a \u0430\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u043e\u0432\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430, amu) &#8212; \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0430 \u0430\u0442\u043e\u043c\u0430 \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u0430 \u0443\u0433\u043b\u0435\u0440\u043e\u0434\u0430-12. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u043e\u0432 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430<\/strong> &#8212; \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u043e\u043c\u043d\u044b\u0445 \u043c\u0430\u0441\u0441 \u0430\u0442\u043e\u043c\u043e\u0432 \u0432 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u0435. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0443 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044b \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u0430 \u0443\u0433\u043b\u0435\u0440\u043e\u0434\u0430-12.<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u0427\u0438\u0441\u043b\u043e \u0410\u0432\u043e\u0433\u0430\u0434\u0440\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u0427\u0438\u0441\u043b\u043e \u0410\u0432\u043e\u0433\u0430\u0434\u0440\u043e<\/strong>\u00a0\u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u043e 6.02214076 x 10^23 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0442\u043e\u043c\u043e\u0432 \u0438\u043b\u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u043e\u043b\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u043e\u0432 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0441 \u043c\u0430\u0441\u0441\u043e\u0439 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u043c\u043e\u043b\u044f\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u041c\u043e\u043b\u0438:<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u043e\u043b\u044c<\/strong>\u00a0&#8212; \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430. \u041e\u0434\u0438\u043d \u043c\u043e\u043b\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u0410\u0432\u043e\u0433\u0430\u0434\u0440\u043e \u0447\u0430\u0441\u0442\u0438\u0446 (\u043e\u043a\u043e\u043b\u043e 6.022 x 10^23) \u0430\u0442\u043e\u043c\u043e\u0432, \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0438\u0446.<\/p>\n<\/li>\n<\/ul>\n<h4>4. \u041c\u0435\u0442\u0430\u043b\u043b\u044b \u0438 \u043d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u0435\u0442\u0430\u043b\u043b\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0442\u0435\u043f\u043b\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u0430, \u043c\u0435\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0431\u043b\u0435\u0441\u043a \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0436\u0435\u043b\u0435\u0437\u043e, \u043c\u0435\u0434\u044c \u0438 \u0430\u043b\u044e\u043c\u0438\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u0430\u043b\u043b\u0430\u043c. \u041d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043b\u043e\u0445\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0442\u0435\u043f\u043b\u043e \u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0445\u0440\u0443\u043f\u043a\u0438\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434, \u0430\u0437\u043e\u0442 \u0438 \u0441\u0435\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>5. \u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b, \u043d\u0435\u0439\u0442\u0440\u043e\u043d\u044b \u0438 \u043f\u0440\u043e\u0442\u043e\u043d\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u0430\u0440\u044f\u0434\u043e\u043c. \u041e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0440\u0431\u0438\u0442\u0430\u043b\u044f\u0445 \u0432\u043e\u043a\u0440\u0443\u0433 \u044f\u0434\u0440\u0430 \u0430\u0442\u043e\u043c\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0442\u043e\u043d\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u0430\u0440\u044f\u0434\u043e\u043c, \u0438 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u0435 \u0430\u0442\u043e\u043c\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0439\u0442\u0440\u043e\u043d\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u0440\u044f\u0434\u0430, \u0438 \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u0435 \u0430\u0442\u043e\u043c\u0430.<\/p>\n<\/li>\n<\/ul>\n<h4>6. \u0417\u0430\u0440\u044f\u0434 \u044f\u0434\u0440\u0430 \u0438 \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0438:<\/h4>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0440\u044f\u0434 \u044f\u0434\u0440\u0430<\/strong> &#8212; \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u0440\u044f\u0434\u043e\u0432 \u043f\u0440\u043e\u0442\u043e\u043d\u043e\u0432 \u0432 \u0430\u0442\u043e\u043c\u043d\u043e\u043c \u044f\u0434\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0438<\/strong> &#8212; \u044d\u0442\u043e \u0443\u0440\u043e\u0432\u043d\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b \u0432 \u0430\u0442\u043e\u043c\u0435. \u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u044f\u0445 \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u043f\u043e\u0433\u043b\u043e\u0449\u0430\u044f \u0438\u043b\u0438 \u0438\u0441\u043f\u0443\u0441\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u0432\u0435\u0442\u0430 (\u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u0438\u043d\u0438\u0439).<\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/h2>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432 \u043c\u043e\u0435\u043c <a href=\"https:\/\/github.com\/OkulusDev\/Oxygen\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub<\/a>. \u0422\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<ol>\n<li>\n<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u0430:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">import re from collections import Counter   class Element:     def __init__(self, short_name: str, electronic_conf_of_outer_layer: str,                 name: str, atomic_number: int, relative_atomic_mass: float,                 group: str, period: int, row: int, group_num: int,                 side_group: bool, is_metal: bool):         self.short_name = short_name         self.electronic_conf_of_outer_layer = electronic_conf_of_outer_layer         self.name = name         self.atomic_number = atomic_number         self.relative_atomic_mass = relative_atomic_mass         self.group = group         self.side_group = side_group         self.is_metal = is_metal         self.period = period         self.row = row         self.group_num = group_num   ELEMENTS = {     # \u0421\u0438\u043c\u0432\u043e\u043b \u042d\u043b\u041a\u043e\u043d\u0444 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0410\u0442\u043e\u043c\u043d\u043e\u0435\u0427\u0438\u0441\u043b\u043e \u041e\u0442\u043d\u043e\u0441\u0410\u0442\u043e\u043c\u041c\u0430\u0441\u0441\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u0440\u044f\u0434     # \u043d\u043e\u043c\u0435\u0440\u0413\u0440\u0443\u043f\u043f\u044b \u042d\u0442\u043e\u043f\u043e\u0431\u043e\u0447\u043d\u0430\u044f\u0413\u0440\u0443\u043f\u043f\u0430 \u042d\u0442\u043e\u041c\u0435\u0442\u0430\u043b     'H': Element('H', '1s^1', '\u0412\u043e\u0434\u043e\u0440\u043e\u0434', 1, 1.00794, 'A', 1, 1, 1, False, False),     'He': Element('He', '1s^2', '\u0413\u0435\u043b\u0438\u0439', 2, 4.002602, 'A', 8, 1, 1, False, False),     'Li': Element('Li', '2s^1', '\u041b\u0438\u0442\u0438\u0439', 3, 6.941, 'A', 1, 2, 2, False, True),     'Be': Element('Be', '2s^2', '\u0411\u0435\u0440\u0438\u043b\u043b\u0438\u0439', 4, 9.01218, 'A', 2, 2, 2, False, True),     'B': Element('B', '2s^2 2p^1', '\u0411\u043e\u0440', 5, 10.811, 'A', 3, 2, 2, False, False),     'C': Element('C', '2s^2 2p^2', '\u0423\u0433\u043b\u0435\u0440\u043e\u0434', 6, 12.011, 'A', 4, 2, 2, False, False),     'N': Element('N', '2s^2 2p^3', '\u0410\u0437\u043e\u0442', 7, 14.0067, 'A', 5, 2, 2, False, False),     'O': Element('O', '2s^2 2p^4', '\u041a\u0438\u0441\u043b\u043e\u0440\u043e\u0434', 8, 15.9994, 'A', 6, 2, 2, False, False),     'F': Element('F', '2s^2 2p^5', '\u0424\u0442\u043e\u0440', 9, 18.998403, 'A', 7, 2, 2, False, False),     'Ne': Element('Ne', '2s^2 2p^6', '\u041d\u0435\u043e\u043d', 10, 20.179, 'A', 8, 2, 2, False, False),     'Na': Element('Na', '3s^1', '\u041d\u0430\u0442\u0440\u0438\u0439', 11, 22.98977, 'A', 1, 3, 3, False, True),     # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 }   def repl(m):     return m[1] * int(m[2] if m[2] else 1)   def parse_molecule(formula: str) -> dict:     while '(' in formula:         formula = re.sub(r'\\((\\w*)\\)(\\d*)', repl, formula)     while '[' in formula:         formula = re.sub(r'\\[(\\w*)\\](\\d*)', repl, formula)     formula = re.sub(r'([A-Z][a-z]?)(\\d*)', repl, formula)     formula_dict = Counter(re.findall('[A-Z][a-z]*', formula))      return formula_dict   def get_element_mass(element):     return ELEMENTS[element].relative_atomic_mass   def calculate_relative_molecular_mass(formula):     result = parse_molecule(formula)     mass = 0      for i in result.items():         print(f'{i[1]} {ELEMENTS[i[0]].name} = {ELEMENTS[i[0]].relative_atomic_mass * i[1]}')         mass += get_element_mass(i[0]) * i[1]      return mass   def main():     formula = input('\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0443: ')     mass = calculate_relative_molecular_mass(formula)     if mass is not None:         print(f'\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u044b {formula} = ~{mass}')     else:         print(f'\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u044b {formula}')   if __name__ == \"__main__\":     main() <\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u043b\u044f\u0440\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u043b\u0435\u043a\u0443\u043b, \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u0438, \u0432\u0441\u0435\u043c \u043f\u043e\u043a\u0430, \u0441 \u0432\u0430\u043c\u0438 \u0431\u044b\u043b \u0414\u043e\u043a\u0442\u043e\u0440 \u0410\u0440\u0433\u0435\u043d\u0442\u0443\u043c<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/774918\/\"> https:\/\/habr.com\/ru\/articles\/774918\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0410\u0440\u0433\u0435\u043d\u0442\u0443\u043c \u043d\u0430 \u0441\u0432\u044f\u0437\u0438, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0445\u0438\u043c\u0438\u0438 \u0441 \u043d\u0443\u043b\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Python. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f, \u043c\u043e\u044f \u0434\u0435\u0431\u044e\u0442\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 &#171;\u0417\u043c\u0435\u0438\u043d\u0430\u044f \u043d\u0430\u0443\u043a\u0430&#187;, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Python? \u0412 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0435 GitHub&#8217;\u0430 \u043e\u043d \u0437\u0430\u043d\u044f\u043b 2-\u0435 \u043c\u0435\u0441\u0442\u043e, \u0443\u0441\u0442\u0443\u043f\u0438\u0432 \u043c\u0435\u0441\u0442\u043e JavaScript, \u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0443\u0440\u0441\u043e\u0432 &#171;\u0421\u0442\u0430\u043d\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0437\u0430 2 \u043c\u0435\u0441\u044f\u0446\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0439 $300\u043a \u0432 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0443&#187; \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0448\u043a\u0430\u043b\u0438\u0432\u0430\u0435\u0442. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u043a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430 \u043e\u0434\u043d\u0443 \u0432\u0430\u043a\u0430\u043d\u0437\u0438\u044e Junior Python \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u0442\u044c \u0434\u043e 1000, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u0437\u0430\u044f\u0432\u043e\u043a. \u041d\u043e \u043e\u043d, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0425\u0438\u043c\u0438\u044f, \u043a\u0430\u043a \u043d\u0430\u0443\u043a\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430. \u0421 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043e\u0442\u043a\u0440\u044b\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u0445\u0438\u043c\u0438\u043a\u043e\u0432: \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f \u0432 \u043c\u0438\u0440 \u0445\u0438\u043c\u0438\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u0437\u043c\u0443 Python &#8212; \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043b \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0445\u0438\u043c\u0438\u043a\u043e\u0432 \u0432 \u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0436\u0435 \u043e\u0431\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0431\u0435\u0437 \u043d\u0438\u0445), \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Python \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c, \u043a\u0430\u043a Python \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043d\u0430\u0443\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u043c \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GitHub \u0438 Git, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0435\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f Python. \u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0432\u0430\u0448\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u0438 \u0441\u0430\u043c pip \u043d\u0435 \u0434\u0430\u0441\u0442 \u0432\u0430\u043c \u044d\u0442\u043e\u0433\u043e (<a href=\"https:\/\/peps.python.org\/pep-0668\/\" rel=\"noopener noreferrer nofollow\">PEP 668<\/a>). \u041d\u0443, \u043a\u0430\u043a \u043d\u0435 \u0434\u0430\u0441\u0442, \u0434\u0430\u0441\u0442, \u043d\u043e \u0441 \u0444\u043b\u0430\u0433\u043e\u043c &#8212;break-system-packages<\/p>\n<pre><code class=\"bash\"># \u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u043b\u044f Linux-\u0441\u0438\u0441\u0442\u0435\u043c python3 -m venv venv         # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 source venv\/bin\/activate     # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e pip3 install --upgrade pip   # \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c pip<\/code><\/pre>\n<h2>\u0422\u0435\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0448\u043a\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u0410 \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0435\u0451?<\/p>\n<h4>1. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430:<\/h4>\n<ul>\n<li>\n<p><strong>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430<\/strong> (\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u0430\u043a \u0430\u0442\u043e\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u043e\u0432\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430, amu) &#8212; \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0430 \u0430\u0442\u043e\u043c\u0430 \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u0430 \u0443\u0433\u043b\u0435\u0440\u043e\u0434\u0430-12. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u043e\u0432 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430<\/strong> &#8212; \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u043e\u043c\u043d\u044b\u0445 \u043c\u0430\u0441\u0441 \u0430\u0442\u043e\u043c\u043e\u0432 \u0432 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u0435. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0443 \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044b \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u0430 \u0443\u0433\u043b\u0435\u0440\u043e\u0434\u0430-12.<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u0427\u0438\u0441\u043b\u043e \u0410\u0432\u043e\u0433\u0430\u0434\u0440\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u0427\u0438\u0441\u043b\u043e \u0410\u0432\u043e\u0433\u0430\u0434\u0440\u043e<\/strong>\u00a0\u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u043e 6.02214076 x 10^23 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0442\u043e\u043c\u043e\u0432 \u0438\u043b\u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u043e\u043b\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u043c\u0430\u0441\u0441\u044b \u0430\u0442\u043e\u043c\u043e\u0432 \u0438 \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0441 \u043c\u0430\u0441\u0441\u043e\u0439 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u043c\u043e\u043b\u044f\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u041c\u043e\u043b\u0438:<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u043e\u043b\u044c<\/strong>\u00a0&#8212; \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430. \u041e\u0434\u0438\u043d \u043c\u043e\u043b\u044c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u0410\u0432\u043e\u0433\u0430\u0434\u0440\u043e \u0447\u0430\u0441\u0442\u0438\u0446 (\u043e\u043a\u043e\u043b\u043e 6.022 x 10^23) \u0430\u0442\u043e\u043c\u043e\u0432, \u043c\u043e\u043b\u0435\u043a\u0443\u043b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0438\u0446.<\/p>\n<\/li>\n<\/ul>\n<h4>4. \u041c\u0435\u0442\u0430\u043b\u043b\u044b \u0438 \u043d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u0435\u0442\u0430\u043b\u043b\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0442\u0435\u043f\u043b\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u0430, \u043c\u0435\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0431\u043b\u0435\u0441\u043a \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0436\u0435\u043b\u0435\u0437\u043e, \u043c\u0435\u0434\u044c \u0438 \u0430\u043b\u044e\u043c\u0438\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u0430\u043b\u043b\u0430\u043c. \u041d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043b\u043e\u0445\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0442\u0435\u043f\u043b\u043e \u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0445\u0440\u0443\u043f\u043a\u0438\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435\u043c\u0435\u0442\u0430\u043b\u043b\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434, \u0430\u0437\u043e\u0442 \u0438 \u0441\u0435\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>5. \u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b, \u043d\u0435\u0439\u0442\u0440\u043e\u043d\u044b \u0438 \u043f\u0440\u043e\u0442\u043e\u043d\u044b:<\/h4>\n<ul>\n<li>\n<p><strong>\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u0430\u0440\u044f\u0434\u043e\u043c. \u041e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0440\u0431\u0438\u0442\u0430\u043b\u044f\u0445 \u0432\u043e\u043a\u0440\u0443\u0433 \u044f\u0434\u0440\u0430 \u0430\u0442\u043e\u043c\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0442\u043e\u043d\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u0430\u0440\u044f\u0434\u043e\u043c, \u0438 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u0435 \u0430\u0442\u043e\u043c\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0439\u0442\u0440\u043e\u043d\u044b<\/strong> &#8212; \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u0440\u044f\u0434\u0430, \u0438 \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u0435 \u0430\u0442\u043e\u043c\u0430.<\/p>\n<\/li>\n<\/ul>\n<h4>6. \u0417\u0430\u0440\u044f\u0434 \u044f\u0434\u0440\u0430 \u0438 \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0438:<\/h4>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0440\u044f\u0434 \u044f\u0434\u0440\u0430<\/strong> &#8212; \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u0440\u044f\u0434\u043e\u0432 \u043f\u0440\u043e\u0442\u043e\u043d\u043e\u0432 \u0432 \u0430\u0442\u043e\u043c\u043d\u043e\u043c \u044f\u0434\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0445\u0438\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0438<\/strong> &#8212; \u044d\u0442\u043e \u0443\u0440\u043e\u0432\u043d\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b \u0432 \u0430\u0442\u043e\u043c\u0435. \u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u044f\u0445 \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u043f\u043e\u0433\u043b\u043e\u0449\u0430\u044f \u0438\u043b\u0438 \u0438\u0441\u043f\u0443\u0441\u043a\u0430\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u0432\u0435\u0442\u0430 (\u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u0438\u043d\u0438\u0439).<\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/h2>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432 \u043c\u043e\u0435\u043c <a href=\"https:\/\/github.com\/OkulusDev\/Oxygen\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub<\/a>. \u0422\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<ol>\n<li>\n<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u0430:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">import re from collections import Counter   class Element:     def __init__(self, short_name: str, electronic_conf_of_outer_layer: str,                 name: str, atomic_number: int, relative_atomic_mass: float,                 group: str, period: int, row: int, group_num: int,                 side_group: bool, is_metal: bool):         self.short_name = short_name         self.electronic_conf_of_outer_layer = electronic_conf_of_outer_layer         self.name = name         self.atomic_number = atomic_number         self.relative_atomic_mass = relative_atomic_mass         self.group = group         self.side_group = side_group         self.is_metal = is_metal         self.period = period         self.row = row         self.group_num = group_num   ELEMENTS = {     # \u0421\u0438\u043c\u0432\u043e\u043b \u042d\u043b\u041a\u043e\u043d\u0444 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0410\u0442\u043e\u043c\u043d\u043e\u0435\u0427\u0438\u0441\u043b\u043e \u041e\u0442\u043d\u043e\u0441\u0410\u0442\u043e\u043c\u041c\u0430\u0441\u0441\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u0440\u044f\u0434     # \u043d\u043e\u043c\u0435\u0440\u0413\u0440\u0443\u043f\u043f\u044b \u042d\u0442\u043e\u043f\u043e\u0431\u043e\u0447\u043d\u0430\u044f\u0413\u0440\u0443\u043f\u043f\u0430 \u042d\u0442\u043e\u041c\u0435\u0442\u0430\u043b     'H': Element('H', '1s^1', '\u0412\u043e\u0434\u043e\u0440\u043e\u0434', 1, 1.00794, 'A', 1, 1, 1, False, False),     'He': Element('He', '1s^2', '\u0413\u0435\u043b\u0438\u0439', 2, 4.002602, 'A', 8, 1, 1, False, False),     'Li': Element('Li', '2s^1', '\u041b\u0438\u0442\u0438\u0439', 3, 6.941, 'A', 1, 2, 2, False, True),     'Be': Element('Be', '2s^2', '\u0411\u0435\u0440\u0438\u043b\u043b\u0438\u0439', 4, 9.01218, 'A', 2, 2, 2, False, True),     'B': Element('B', '2s^2 2p^1', '\u0411\u043e\u0440', 5, 10.811, 'A', 3, 2, 2, False, False),     'C': Element('C', '2s^2 2p^2', '\u0423\u0433\u043b\u0435\u0440\u043e\u0434', 6, 12.011, 'A', 4, 2, 2, False, False),     'N': Element('N', '2s^2 2p^3', '\u0410\u0437\u043e\u0442', 7, 14.0067, 'A', 5, 2, 2, False, False),     'O': Element('O', '2s^2 2p^4', '\u041a\u0438\u0441\u043b\u043e\u0440\u043e\u0434', 8, 15.9994, 'A', 6, 2, 2, False, False),     'F': Element('F', '2s^2 2p^5', '\u0424\u0442\u043e\u0440', 9, 18.998403, 'A', 7, 2, 2, False, False),     'Ne': Element('Ne', '2s^2 2p^6', '\u041d\u0435\u043e\u043d', 10, 20.179, 'A', 8, 2, 2, False, False),     'Na': Element('Na', '3s^1', '\u041d\u0430\u0442\u0440\u0438\u0439', 11, 22.98977, 'A', 1, 3, 3, False, True),     # \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 }   def repl(m):     return m[1] * int(m[2] if m[2] else 1)   def parse_molecule(formula: str) -> dict:     while '(' in formula:         formula = re.sub(r'\\((\\w*)\\)(\\d*)', repl, formula)     while '[' in formula:         formula = re.sub(r'\\[(\\w*)\\](\\d*)', repl, formula)     formula = re.sub(r'([A-Z][a-z]?)(\\d*)', repl, formula)     formula_dict = Counter(re.findall('[A-Z][a-z]*', formula))      return formula_dict   def get_element_mass(element):     return ELEMENTS[element].relative_atomic_mass   def calculate_relative_molecular_mass(formula):     result = parse_molecule(formula)     mass = 0      for i in result.items():         print(f'{i[1]} {ELEMENTS[i[0]].name} = {ELEMENTS[i[0]].relative_atomic_mass * i[1]}')         mass += get_element_mass(i[0]) * i[1]      return mass   def main():     formula = input('\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0443: ')     mass = calculate_relative_molecular_mass(formula)     if mass is not None:         print(f'\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u043b\u0435\u043a\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u044b {formula} = ~{mass}')     else:         print(f'\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u044b {formula}')   if __name__ == \"__main__\":     main() <\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u043b\u044f\u0440\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u043b\u0435\u043a\u0443\u043b, \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u0438, \u0432\u0441\u0435\u043c \u043f\u043e\u043a\u0430, \u0441 \u0432\u0430\u043c\u0438 \u0431\u044b\u043b \u0414\u043e\u043a\u0442\u043e\u0440 \u0410\u0440\u0433\u0435\u043d\u0442\u0443\u043c<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/774918\/\"> https:\/\/habr.com\/ru\/articles\/774918\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-360592","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/360592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360592"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/360592\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}