{"id":135506,"date":"2026-08-02T13:02:45","date_gmt":"2026-08-02T07:02:45","guid":{"rendered":"https:\/\/rcl-radio.ru\/?p=135506"},"modified":"2026-08-02T13:02:45","modified_gmt":"2026-08-02T07:02:45","slug":"%d0%be%d0%bf%d0%b5%d1%80%d0%b0%d1%82%d0%be%d1%80%d1%8b-%d0%b2-python-%d0%b0%d1%80%d0%b8%d1%84%d0%bc%d0%b5%d1%82%d0%b8%d0%ba%d0%b0-%d1%81%d1%80%d0%b0%d0%b2%d0%bd%d0%b5%d0%bd%d0%b8%d0%b5-%d0%bb%d0%be","status":"publish","type":"post","link":"https:\/\/rcl-radio.ru\/?p=135506","title":{"rendered":"\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432 Python: \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0430, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438\u00a0\u2014\u00a0\u0447\u0442\u043e \u0438 \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c"},"content":{"rendered":"<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 Python\u00a0\u2014\u00a0\u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430\u043c\u0438 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438). \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c, \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0442\u0440\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b: \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435. \u0412\u0441\u0451\u00a0\u2014\u00a0\u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438, \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0443\u043c\u0435\u0441\u0442\u0435\u043d.<\/p>\n<hr \/>\n<h2>\u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/h2>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439: \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u043e\u0432, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u0442.\u00a0\u043f.<\/p>\n<table>\n<thead>\n<tr>\n<th>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440<\/th>\n<th>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code class=\"CodeInlined\">+<\/code><\/td>\n<td>\u0421\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/td>\n<td><code class=\"CodeInlined\">2 + 3<\/code><\/td>\n<td><code class=\"CodeInlined\">5<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">-<\/code><\/td>\n<td>\u0412\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435<\/td>\n<td><code class=\"CodeInlined\">10 - 4<\/code><\/td>\n<td><code class=\"CodeInlined\">6<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">*<\/code><\/td>\n<td>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435<\/td>\n<td><code class=\"CodeInlined\">3 * 4<\/code><\/td>\n<td><code class=\"CodeInlined\">12<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">\/<\/code><\/td>\n<td>\u0414\u0435\u043b\u0435\u043d\u0438\u0435 (\u0432\u0441\u0435\u0433\u0434\u0430 float)<\/td>\n<td><code class=\"CodeInlined\">10 \/ 3<\/code><\/td>\n<td><code class=\"CodeInlined\">3.333...<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">\/\/<\/code><\/td>\n<td>\u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/td>\n<td><code class=\"CodeInlined\">10 \/\/ 3<\/code><\/td>\n<td><code class=\"CodeInlined\">3<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">%<\/code><\/td>\n<td>\u041e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/td>\n<td><code class=\"CodeInlined\">10 % 3<\/code><\/td>\n<td><code class=\"CodeInlined\">1<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">**<\/code><\/td>\n<td>\u0412\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c<\/td>\n<td><code class=\"CodeInlined\">2 ** 3<\/code><\/td>\n<td><code class=\"CodeInlined\">8<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u041a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<\/h3>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><strong><code class=\"CodeInlined\">+<\/code>, <code class=\"CodeInlined\">-<\/code>, <code class=\"CodeInlined\">*<\/code>.<\/strong> \u0414\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u0432.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong><code class=\"CodeInlined\">\/<\/code>.<\/strong> \u041a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435).<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong><code class=\"CodeInlined\">\/\/<\/code> \u0438 <code class=\"CodeInlined\">%<\/code>.<\/strong> \u0427\u0430\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u044b \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438, \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u0447\u0451\u0442\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong><code class=\"CodeInlined\">**<\/code>.<\/strong> \u0414\u043b\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439, \u043a\u043e\u0440\u043d\u0435\u0439 (\u0447\u0435\u0440\u0435\u0437 \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c), \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b.<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/h3>\n<p><strong>\u0427\u0451\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0430:<\/strong><\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">n <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">7<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">if<\/span> n % <span style=\"color: #ff4500;\">2<\/span> <span style=\"color: #66cc66;\">==<\/span> <span style=\"color: #ff4500;\">0<\/span>:\r\n    <span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"\u0427\u0451\u0442\u043d\u043e\u0435\"<\/span><span style=\"color: black;\">)<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">else<\/span>:\r\n    <span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"\u041d\u0435\u0447\u0451\u0442\u043d\u043e\u0435\"<\/span><span style=\"color: black;\">)<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>\u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f):<\/strong><\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">items_per_page <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">10<\/span>\r\ntotal_items <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">23<\/span>\r\npages <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: black;\">(<\/span>total_items + items_per_page - <span style=\"color: #ff4500;\">1<\/span><span style=\"color: black;\">)<\/span> \/\/ items_per_page  <span style=\"color: #808080; font-style: italic;\"># \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0440\u0445<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span>pages<span style=\"color: black;\">)<\/span>  <span style=\"color: #808080; font-style: italic;\"># 3<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0430 <code class=\"CodeInlined\">(a + b - 1) \/\/ b<\/code>\u00a0\u2014\u00a0\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u0451\u043c \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0432\u0432\u0435\u0440\u0445 \u043f\u0440\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0438.<\/p>\n<p><strong>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430 \u0441\u043a\u0438\u0434\u043a\u0438:<\/strong><\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">price <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">1990<\/span>\r\ndiscount_percent <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">15<\/span>\r\ndiscount <span style=\"color: #66cc66;\">=<\/span> price * <span style=\"color: black;\">(<\/span>discount_percent \/ <span style=\"color: #ff4500;\">100<\/span><span style=\"color: black;\">)<\/span>\r\nfinal <span style=\"color: #66cc66;\">=<\/span> price - discount\r\n<span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span>final<span style=\"color: black;\">)<\/span>  <span style=\"color: #808080; font-style: italic;\"># 1691.5<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>\u041a\u043e\u0440\u0435\u043d\u044c \u0447\u0435\u0440\u0435\u0437 \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c:<\/strong><\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">x <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">16<\/span>\r\nroot <span style=\"color: #66cc66;\">=<\/span> x ** <span style=\"color: #ff4500;\">0.5<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span>root<span style=\"color: black;\">)<\/span>  <span style=\"color: #808080; font-style: italic;\"># 4.0<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<hr \/>\n<h2>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0431\u0443\u043b\u0435\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: <code class=\"CodeInlined\">True<\/code> \u0438\u043b\u0438 <code class=\"CodeInlined\">False<\/code>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 (<code class=\"CodeInlined\">if<\/code>, <code class=\"CodeInlined\">while<\/code>) \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f\u0445.<\/p>\n<table>\n<thead>\n<tr>\n<th>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code class=\"CodeInlined\">==<\/code><\/td>\n<td>\u0420\u0430\u0432\u043d\u043e<\/td>\n<td><code class=\"CodeInlined\">5 == 5<\/code> \u2192 <code class=\"CodeInlined\">True<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">!=<\/code><\/td>\n<td>\u041d\u0435 \u0440\u0430\u0432\u043d\u043e<\/td>\n<td><code class=\"CodeInlined\">5 != 3<\/code> \u2192 <code class=\"CodeInlined\">True<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">&gt;<\/code><\/td>\n<td>\u0411\u043e\u043b\u044c\u0448\u0435<\/td>\n<td><code class=\"CodeInlined\">10 &gt; 3<\/code> \u2192 <code class=\"CodeInlined\">True<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">&lt;<\/code><\/td>\n<td>\u041c\u0435\u043d\u044c\u0448\u0435<\/td>\n<td><code class=\"CodeInlined\">3 &lt; 10<\/code> \u2192 <code class=\"CodeInlined\">True<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">&gt;=<\/code><\/td>\n<td>\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e<\/td>\n<td><code class=\"CodeInlined\">5 &gt;= 5<\/code> \u2192 <code class=\"CodeInlined\">True<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">&lt;=<\/code><\/td>\n<td>\u041c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e<\/td>\n<td><code class=\"CodeInlined\">3 &lt;= 5<\/code> \u2192 <code class=\"CodeInlined\">True<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u0427\u0430\u0441\u0442\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430: <code class=\"CodeInlined\">=<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code class=\"CodeInlined\">==<\/code><\/h3>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">=<\/code>\u00a0\u2014\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">==<\/code>\u00a0\u2014\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">x <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">5<\/span>          <span style=\"color: #808080; font-style: italic;\"># \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">if<\/span> x <span style=\"color: #66cc66;\">==<\/span> <span style=\"color: #ff4500;\">5<\/span>:     <span style=\"color: #808080; font-style: italic;\"># \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/span>\r\n    <span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"OK\"<\/span><span style=\"color: black;\">)<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code class=\"CodeInlined\">if x = 5:<\/code>\u00a0\u2014\u00a0\u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432<\/h3>\n<p>Python \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u0435\u043b \u0438 \u0441\u0442\u0440\u043e\u043a, \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c. \u041b\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #483d8b;\">\"10\"<\/span> <span style=\"color: #66cc66;\">==<\/span> <span style=\"color: #ff4500;\">10<\/span>      <span style=\"color: #808080; font-style: italic;\"># False (\u0441\u0442\u0440\u043e\u043a\u0430 \u0438 \u0447\u0438\u0441\u043b\u043e \u043d\u0435 \u0440\u0430\u0432\u043d\u044b)<\/span>\r\n<span style=\"color: #008000;\">int<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"10\"<\/span><span style=\"color: black;\">)<\/span> <span style=\"color: #66cc66;\">==<\/span> <span style=\"color: #ff4500;\">10<\/span> <span style=\"color: #808080; font-style: italic;\"># True<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430<\/h3>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">age <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">17<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">if<\/span> <span style=\"color: #ff4500;\">0<\/span> <span style=\"color: #66cc66;\">&lt;=<\/span> age <span style=\"color: #66cc66;\">&lt;=<\/span> <span style=\"color: #ff4500;\">120<\/span>:\r\n    <span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"\u0412\u043e\u0437\u0440\u0430\u0441\u0442 \u0432 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435\"<\/span><span style=\"color: black;\">)<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">else<\/span>:\r\n    <span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\"<\/span><span style=\"color: black;\">)<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0412 Python \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 (<code class=\"CodeInlined\">0 &lt;= age &lt;= 120<\/code>)\u00a0\u2014\u00a0\u044d\u0442\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e.<\/p>\n<hr \/>\n<h2>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/h2>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435: <code class=\"CodeInlined\">and<\/code>, <code class=\"CodeInlined\">or<\/code>, <code class=\"CodeInlined\">not<\/code>.<\/p>\n<table>\n<thead>\n<tr>\n<th>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440<\/th>\n<th>\u0421\u043c\u044b\u0441\u043b<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code class=\"CodeInlined\">and<\/code><\/td>\n<td>\u0418 (\u043e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c\u0438)<\/td>\n<td><code class=\"CodeInlined\">(x &gt; 0) and (x &lt; 10)<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">or<\/code><\/td>\n<td>\u0418\u041b\u0418 (\u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u043e)<\/td>\n<td><code class=\"CodeInlined\">(x &lt; 0) or (x &gt; 100)<\/code><\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">not<\/code><\/td>\n<td>\u041d\u0415 (\u0438\u043d\u0432\u0435\u0440\u0441\u0438\u044f)<\/td>\n<td><code class=\"CodeInlined\">not (x == 5)<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438 \u0441\u043a\u043e\u0431\u043a\u0438<\/h3>\n<p>\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442: <code class=\"CodeInlined\">not<\/code> \u2192 <code class=\"CodeInlined\">and<\/code> \u2192 <code class=\"CodeInlined\">or<\/code>. \u0414\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043a\u043e\u0431\u043a\u0438:<\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">is_member <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #008000;\">True<\/span>\r\nhas_coupon <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #008000;\">False<\/span>\r\ntotal <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">1200<\/span>\r\n\u00a0\r\n<span style=\"color: #808080; font-style: italic;\"># \u0421\u043a\u0438\u0434\u043a\u0430, \u0435\u0441\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0418\u041b\u0418 \u0435\u0441\u0442\u044c \u043a\u0443\u043f\u043e\u043d, \u0418 \u0441\u0443\u043c\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 1000<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">if<\/span> <span style=\"color: black;\">(<\/span>is_member <span style=\"color: #ff7700; font-weight: bold;\">or<\/span> has_coupon<span style=\"color: black;\">)<\/span> <span style=\"color: #ff7700; font-weight: bold;\">and<\/span> total <span style=\"color: #66cc66;\">&gt;<\/span> <span style=\"color: #ff4500;\">1000<\/span>:\r\n    <span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"\u0421\u043a\u0438\u0434\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f\"<\/span><span style=\"color: black;\">)<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0411\u0435\u0437 \u0441\u043a\u043e\u0431\u043e\u043a \u043b\u043e\u0433\u0438\u043a\u0430 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0441\u0442\u0430\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439 \u0438\u0437\u2011\u0437\u0430 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<h3>\u041a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 (short\u2011circuit evaluation)<\/h3>\n<p>Python \u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0432\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u0436\u0435 \u044f\u0441\u0435\u043d:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">False and ...<\/code>\u00a0\u2014\u00a0\u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">True or ...<\/code>\u00a0\u2014\u00a0\u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f.<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a:<\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #dc143c;\">user<\/span> <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #008000;\">None<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">if<\/span> <span style=\"color: #dc143c;\">user<\/span> <span style=\"color: #ff7700; font-weight: bold;\">is<\/span> <span style=\"color: #ff7700; font-weight: bold;\">not<\/span> <span style=\"color: #008000;\">None<\/span> <span style=\"color: #ff7700; font-weight: bold;\">and<\/span> <span style=\"color: #dc143c;\">user<\/span>.<span style=\"color: black;\">is_active<\/span>:\r\n    <span style=\"color: #808080; font-style: italic;\"># user.is_active \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 user == None<\/span>\r\n    <span style=\"color: #ff7700; font-weight: bold;\">pass<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<hr \/>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0440\u0430\u0441\u0447\u0451\u0442 \u0441\u043a\u0438\u0434\u043a\u0438 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0441\u043a\u0438\u0434\u043a\u0430 20\u00a0% \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442, \u0435\u0441\u043b\u0438:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\">\u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044c\u00a0\u2014\u00a0\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043b\u043e\u044f\u043b\u044c\u043d\u043e\u0441\u0442\u0438,<\/li>\n<li data-value=\"\" data-shift=\"0\">\u0418 \u0441\u0443\u043c\u043c\u0430 \u0447\u0435\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 1000 \u0440\u0443\u0431\u043b\u0435\u0439,<\/li>\n<li data-value=\"\" data-shift=\"0\">\u0418\u041b\u0418 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434.<\/li>\n<\/ul>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\">is_member <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #008000;\">True<\/span>\r\ntotal <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">1200<\/span>\r\nhas_promo <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #008000;\">False<\/span>\r\n\u00a0\r\ndiscount_rate <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">0.0<\/span>\r\n\u00a0\r\n<span style=\"color: #ff7700; font-weight: bold;\">if<\/span> is_member <span style=\"color: #ff7700; font-weight: bold;\">and<\/span> <span style=\"color: black;\">(<\/span>total <span style=\"color: #66cc66;\">&gt;<\/span> <span style=\"color: #ff4500;\">1000<\/span> <span style=\"color: #ff7700; font-weight: bold;\">or<\/span> has_promo<span style=\"color: black;\">)<\/span>:\r\n    discount_rate <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">0.20<\/span>\r\n\u00a0\r\nfinal_price <span style=\"color: #66cc66;\">=<\/span> total * <span style=\"color: black;\">(<\/span><span style=\"color: #ff4500;\">1<\/span> - discount_rate<span style=\"color: black;\">)<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #483d8b;\">\"\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0446\u0435\u043d\u0430:\"<\/span><span style=\"color: #66cc66;\">,<\/span> final_price<span style=\"color: black;\">)<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-135507\" src=\"https:\/\/rcl-radio.ru\/wp-content\/uploads\/2026\/08\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2026-08-02-13-01-34.png\" alt=\"\" width=\"772\" height=\"53\" srcset=\"https:\/\/rcl-radio.ru\/wp-content\/uploads\/2026\/08\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2026-08-02-13-01-34.png 772w, https:\/\/rcl-radio.ru\/wp-content\/uploads\/2026\/08\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2026-08-02-13-01-34-500x34.png 500w, https:\/\/rcl-radio.ru\/wp-content\/uploads\/2026\/08\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2026-08-02-13-01-34-200x14.png 200w, https:\/\/rcl-radio.ru\/wp-content\/uploads\/2026\/08\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2026-08-02-13-01-34-768x53.png 768w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\">\u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b\u00a0\u2014\u00a0\u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0446\u0435\u043d\u044b;<\/li>\n<li data-value=\"\" data-shift=\"0\">\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u00a0\u2014\u00a0\u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0439;<\/li>\n<li data-value=\"\" data-shift=\"0\">\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435\u00a0\u2014\u00a0\u0434\u043b\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b.<\/li>\n<\/ul>\n<hr \/>\n<h2>\u0427\u0430\u0441\u0442\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043a\u0430\u043a \u0438\u0445 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c<\/h2>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><strong>\u041f\u0443\u0442\u0430\u044e\u0442 <code class=\"CodeInlined\">=<\/code> \u0438 <code class=\"CodeInlined\">==<\/code><\/strong> \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435, \u0447\u0442\u043e \u0432 <code class=\"CodeInlined\">if<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong>\u0417\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u043e \u0442\u0438\u043f\u044b.<\/strong> <code class=\"CodeInlined\">\"5\" &gt; 2<\/code> \u0432\u044b\u0437\u043e\u0432\u0435\u0442 <code class=\"CodeInlined\">TypeError<\/code> \u0432 Python\u00a03. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0435 \u0442\u0438\u043f\u044b \u044f\u0432\u043d\u043e: <code class=\"CodeInlined\">int(\"5\") &gt; 2<\/code>.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong>\u041d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/strong> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0434\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 float \u00ab\u0432 \u043b\u043e\u0431\u00bb.<\/strong> \u0418\u0437\u2011\u0437\u0430 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0435\u0439 <code class=\"CodeInlined\">0.1 + 0.2 == 0.3<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <code class=\"CodeInlined\">False<\/code>. \u0414\u043b\u044f \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code class=\"CodeInlined\">math.isclose()<\/code>:<\/li>\n<\/ul>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">python<\/div>\n<pre class=\"python\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #ff7700; font-weight: bold;\">import<\/span> <span style=\"color: #dc143c;\">math<\/span>\r\na <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">0.1<\/span> + <span style=\"color: #ff4500;\">0.2<\/span>\r\nb <span style=\"color: #66cc66;\">=<\/span> <span style=\"color: #ff4500;\">0.3<\/span>\r\n<span style=\"color: #ff7700; font-weight: bold;\">print<\/span><span style=\"color: black;\">(<\/span><span style=\"color: #dc143c;\">math<\/span>.<span style=\"color: black;\">isclose<\/span><span style=\"color: black;\">(<\/span>a<span style=\"color: #66cc66;\">,<\/span> b<span style=\"color: black;\">)<\/span><span style=\"color: black;\">)<\/span>  <span style=\"color: #808080; font-style: italic;\"># True<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 Python\u00a0\u2014\u00a0\u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430\u043c\u0438 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438). \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c, \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0442\u0440\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b: \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435. \u0412\u0441\u0451\u00a0\u2014\u00a0\u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438, \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0443\u043c\u0435\u0441\u0442\u0435\u043d. \u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439: \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u043e\u0432, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, [&hellip;]<\/p>\n","protected":false},"author":9194254,"featured_media":135498,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[556],"tags":[],"class_list":["post-135506","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"views":6,"_links":{"self":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/9194254"}],"replies":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135506"}],"version-history":[{"count":1,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135506\/revisions"}],"predecessor-version":[{"id":135508,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135506\/revisions\/135508"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/135498"}],"wp:attachment":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}