{"id":373818,"date":"2024-05-21T05:45:05","date_gmt":"2024-05-21T05:45:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=373818"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=373818","title":{"rendered":"<span>\u041a\u0430\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u0437\u043e\u0442\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/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<p>\u0421 7 \u043a\u043b\u0430\u0441\u0441\u0430 \u044f \u0441\u0442\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0443\u0440\u043e\u043a\u043e\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u043a\u0438 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u044f\u0437\u044b\u043a, \u043a\u0430\u043a Python. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0435, \u0432\u0435\u0434\u044c \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u043b\u0438\u0448\u044c \u043d\u0430 \u0431\u043b\u043e\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u043f\u043e \u0442\u0438\u043f\u0443 Scratch). \u041e\u0434\u043d\u0430\u043a\u043e, \u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0433\u043b\u0443\u0431\u0438\u043b\u0441\u044f \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u0443\u0436\u0435 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u044e \u043d\u0430 \u043d\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u042f \u043c\u043d\u043e\u0433\u043e\u0435 \u043d\u0430 \u043d\u0435\u043c \u043f\u0438\u0441\u0430\u043b, \u043e\u0442 \u201cHello, World!\u201d \u0434\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430. \u042d\u0442\u043e \u0431\u044b\u043b \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0439 \u043e\u043f\u044b\u0442.<\/p>\n<p>\u041d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0431\u044b \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c. \u0411\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u043d\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0442\u0449\u0435\u0442\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043e\u043f\u044b\u0442\u0430. \u0418 \u043d\u0435\u0434\u0435\u043b\u044e \u043d\u0430\u0437\u0430\u0434 \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u043d\u0430 YouTube \u0432\u0438\u0434\u0435\u043e, \u0433\u0434\u0435 \u0430\u0432\u0442\u043e\u0440 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431 10 \u044d\u0437\u043e\u0442\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 &#8212; \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u043d\u0438\u0445 \u0431\u044b\u043b\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c. \u0418 \u044f \u0441\u043b\u043e\u0432\u0438\u043b \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u044f\u0437\u044b\u043a. \u0422\u0430\u043a \u043d\u0430 \u0441\u0432\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u044f\u0437\u044b\u043a C42.<\/p>\n<h2>\u041e \u044f\u0437\u044b\u043a\u0435<\/h2>\n<p>C42 &#8212; \u044d\u0442\u043e \u044f\u0437\u044b\u043a, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 Assembler, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e 42 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 (\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c), \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 (int, string, float). \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0444\u0440\u0430\u0437\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/p>\n<pre><code class=\"cpp\">#1 1  41 -1 1 04 -1 \"Hello, World!\" 02 -1  #0<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u043b\u0441\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 (\u0430\u043d\u0430\u043b\u043e\u0433 \u0444\u0443\u043d\u043a\u0446\u0438\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a \u0441 \u0438\u043c\u0435\u043d\u0435\u043c 1, \u0438 \u043d\u0435 \u0441\u043f\u0440\u043e\u0441\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u0441 \u0438\u043d\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c 1 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 (\u043a\u0430\u043a \u0432 \u0442\u043e\u043c \u0436\u0435 C \u0444\u0443\u043d\u043a\u0446\u0438\u044f main), \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0430\u0447\u0430\u043b\u043e \u0431\u043b\u043e\u043a\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f <code>#1 blockID<\/code>. \u0430 \u043a\u043e\u043d\u0435\u0446 &#8212; <code>#0<\/code>. \u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u044f \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435. \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 <code>$<\/code> \u0432\u0441\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c.<\/p>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 C42 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0438\u043b\u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e\u0432\u0441\u0435). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 41 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438) \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 2 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0442 -1 \u0438 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0430 \u044f\u0447\u0435\u0439\u043a\u0430: 0 &#8212; int, 1 &#8212; string, 2 &#8212; float  <\/p>\n<h2>\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440<\/h2>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043a\u0430\u043a \u044f \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430, \u044f \u0431\u0435\u0437 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u043c, \u0434\u0430 \u0438 \u044f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u042f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0431\u0435\u0437 \u043b\u0435\u043a\u0441\u0435\u0440\u0430 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 (\u0445\u043e\u0442\u044f \u043f\u0430\u0440\u0441\u0435\u0440 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 4 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><code>main.py<\/code> &#8212; \u043a\u0430\u043a \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>interpreter.py<\/code> &#8212; \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>exception.py<\/code> &#8212; \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<\/li>\n<li>\n<p><code>constants.py<\/code> &#8212; \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0448\u0435\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439:<\/p>\n<pre><code class=\"python\">from interpreter import Interpreter   code: str = \"\"  with open(\"code.cft\", \"r\", encoding = \"utf-8\") as file:     code = file.read()  C42 = Interpreter(code) C42.Interpret()<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e \u043a\u043b\u0430\u0441\u0441 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u0447\u0438\u0442\u0430\u044e \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u044e \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u0424\u0430\u0439\u043b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u043c, \u0432\u0441\u0435\u0433\u043e 49 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">class Error:     def __init__(self, message, line, command):         print()         if command != None:             print(f\"> {command}\")             print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 : \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 {line} : {message}\")         else:             print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 : {message}\")         exit(1)  class BlockNotFound(Error):     def __init__(self, name):         super().__init__(f\"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0431\u043b\u043e\u043a \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c {name}\", None, None) ...<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0441\u0430\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435. \u0417\u0430\u0442\u0435\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u041f\u043e \u0444\u0430\u0439\u043b\u0443 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0441\u043e\u0431\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0435\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c. \u0424\u0430\u0439\u043b \u0441 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0430 576 \u0441\u0442\u0440\u043e\u043a, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043b\u0430\u0441\u0441. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043d\u043e, \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u044d\u0442\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442. \u0412 \u0444\u0430\u0439\u043b\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430: Cell, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\">class Cell:      CELLS: list['Cell'] = []      def __init__(self, name: str, defaultValue: int | float | str, dataType: str):          cell = Cell.GetCellByName(name)         if cell != None:             Cell.CELLS.remove(cell)         Cell.CELLS.append(self)          self.name = name         self.defaultValue = defaultValue         self.value = defaultValue         self.dataType = dataType          @staticmethod     def GetCellByName(name: str) -> 'Cell':         return next((cell for cell in Cell.CELLS if cell.name == name), None)      @staticmethod     def isFloat(s):         try:              float(s)             return True         except:             return False      @staticmethod     def isInt(s):         try:              int(s)             return True         except:             return False      @staticmethod     def isString(s):         return s[0] == \"\\\"\" and s[-1] == \"\\\"\" if s != \"\" else True          @staticmethod     def isCorrectName(name: str):         return bool(re.match(r\"^-[1-9][0-9]*$\", name))          @staticmethod     def isCorrectDataType(char: str):         return char in [INT, STRING, FLOAT]<\/code><\/pre>\n<p>\u0418 \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440:<\/p>\n<pre><code class=\"python\">class Interpreter:     def __init__(self, code: str):          self.cells: list[Cell] = []          self.code = code         self.blocks: dict[list[list[str]]] = {}         self.currentLine = 0         self.currentCommand = \"\"         self.skipNextCommand = False         self.executionStack: list[list[str, bool]] = []         self.returnCalled = False          self.Parse()          def Interpret(self, blockId: str = \"1\"):         if blockId not in self.blocks:             BlockNotFound(blockId)                  self.executionStack.append([blockId, False])         idx = {block: -1 for block in self.blocks}          while self.executionStack:             currentBlock = self.executionStack.pop()             commands = self.blocks[currentBlock[0]]             blockName = currentBlock[0]             blockIsLoop = currentBlock[1]              while 1:                 idx[blockName] += 1 if not idx[blockName] + 1 > len(commands) - 1 else 0                 self.currentLine = commands[idx[blockName]][0]                 self.currentCommand = \" \".join(commands[idx[blockName]][1])                  if self.skipNextCommand:                     self.skipNextCommand = False                     continue                  nextCommand = None if idx[blockName] + 1 > len(commands) - 1 else commands[idx[blockName] + 1]                 forceExit = self.ExecuteCommand(commands[idx[blockName]][1], nextCommand)                  if self.returnCalled:                     break                 elif forceExit:                     break                 elif idx[blockName] >= len(commands) - 1:                     idx[blockName] = -1                     break              if not self.returnCalled and blockIsLoop:                 self.executionStack.append(currentBlock)                 self.returnCalled = False             elif forceExit and not idx[blockName] >= len(commands) - 1:                 self.executionStack.append(currentBlock)                 self.executionStack[-1], self.executionStack[-2] = self.executionStack[-2], self.executionStack[-1]      def ExecuteCommand(self, command, nextCommand):         CMD = command[0]          if CMD == EXIT: exit(1)                  elif CMD == PRINT:             cell = self.GetCell(self.GetArgument(1, command))             print(str(cell.value).replace(\"\\\\n\", \"\\n\"), end = \"\", flush = True)              elif CMD == INPUT:             cell = self.GetCell(self.GetArgument(1, command))             value = input()             self.ChangeValue(cell, value, False)          elif CMD == ASSIGN_VALUE:             value = self.GetArgument(2, command)             cell = self.GetCell(self.GetArgument(1, command))             self.ChangeValue(cell, value)                      ... # \u0434\u0430\u043b\u044c\u0448\u0435 \u0442\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434      def Parse(self):         lines = self.code.split('\\n')         result = {}         block = None         line_number = 1          for line in lines:             if line.startswith(START_BLOCK):                 if block != None:                     del result[block]                 words = line.split()                 if len(words) &lt;= 1 or len(words) > 2:                     block = None                     continue                 block = words[1]                 result[block] = []             elif line.startswith(END_BLOCK):                 block = None             elif block is not None and line.strip():                 parsed_line = (line_number, re.findall(r'(?:\"[^\"]*\"|[^\"\\s]+)', line))                 if '$' in parsed_line[1]:                     parsed_line = (parsed_line[0], parsed_line[1][:parsed_line[1].index('$')])                 if parsed_line[1]:                     result[block].append(parsed_line)              line_number += 1          self.blocks = result          def GetCell(self, name: str) -> Cell:         cell = Cell.GetCellByName(name)         if cell != None:             return cell         CellNotFound(self.currentLine, self.currentCommand, name)          def GetArgument(self, index: int, command: list[str]) -> str:         if index &lt;= len(command) - 1:             return command[index]         InvalidSyntax(self.currentLine, self.currentCommand)          def ChangeValue(self, cell: Cell, value: str, lookAtQuotes = True, mode = \"set\") -> bool:         if value != str:             value = str(value)          if cell.dataType == INT:             if Cell.isInt(value):                 if mode == \"set\":                     cell.value = int(value)                 elif mode == \"add\":                     cell.value += int(value)             else:                 IncorrectValue(self.currentLine, self.currentCommand, \"int\")                  elif cell.dataType == FLOAT:             if Cell.isFloat(value):                 if mode == \"set\":                     cell.value = float(value)                 elif mode == \"add\":                     cell.value += float(value)             else:                 IncorrectValue(self.currentLine, self.currentCommand, \"float\")                      elif cell.dataType == STRING:             if Cell.isString(value) or not lookAtQuotes:                 if mode == \"set\":                     cell.value = value[1:-1] if lookAtQuotes else value                 elif mode == \"add\":                     cell.value += value[1:-1]             else:                 IncorrectValue(self.currentLine, self.currentCommand, \"string\")<\/code><\/pre>\n<p>\u0412\u00a0<code>init<\/code>\u00a0\u044f \u0441\u043e\u0437\u0434\u0430\u044e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e \u043c\u0435\u0442\u043e\u0434\u00a0<code>Parse<\/code>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0434 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0431\u043b\u043e\u043a\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 \u0431\u043b\u043e\u043a\u0430. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0<code>Interpret<\/code>\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 \u0432\u00a0<code>self.executionStack<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0431\u043b\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0431\u044b\u043b \u0432\u044b\u0437\u0432\u0430\u043d \u043a\u0430\u043a \u0446\u0438\u043a\u043b, \u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 42 (return) \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0431\u043b\u043e\u043a \u0431\u044b\u043b \u0432\u044b\u0437\u0432\u0430\u043d \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0435\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0434\u0430\u043b\u0438\u0442 \u0431\u043b\u043e\u043a \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430.  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0438 \u0446\u0435\u043b\u043e\u043c, \u044f \u0440\u0430\u0434, \u0447\u0442\u043e \u0441\u043c\u043e\u0433 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a. \u0425\u043e\u0442\u044f \u043e\u043d \u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0435\u0441 \u043c\u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u043d\u043e \u044f \u0441\u043c\u043e\u0433 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0434\u0430\u0432\u043d\u044e\u044e \u043c\u0435\u0447\u0442\u0443. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u043c\u043e\u044e \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e. \u0416\u0435\u043b\u0430\u044e \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0434\u043d\u044f! <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u044f\u0437\u044b\u043a\u0430, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443 \u043d\u0430\u0434\u043e &#8212; <a href=\"https:\/\/github.com\/AlmazCode\/C42\" rel=\"noopener noreferrer nofollow\">AlmazCode\/C42: C42: \u042d\u0437\u043e\u0442\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 ASM. (github.com<\/a>)<\/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\/808183\/\"> https:\/\/habr.com\/ru\/articles\/808183\/<\/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<p>\u0421 7 \u043a\u043b\u0430\u0441\u0441\u0430 \u044f \u0441\u0442\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0443\u0440\u043e\u043a\u043e\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u043a\u0438 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u044f\u0437\u044b\u043a, \u043a\u0430\u043a Python. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0435, \u0432\u0435\u0434\u044c \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u043b\u0438\u0448\u044c \u043d\u0430 \u0431\u043b\u043e\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u043f\u043e \u0442\u0438\u043f\u0443 Scratch). \u041e\u0434\u043d\u0430\u043a\u043e, \u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0433\u043b\u0443\u0431\u0438\u043b\u0441\u044f \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u0443\u0436\u0435 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u044e \u043d\u0430 \u043d\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u042f \u043c\u043d\u043e\u0433\u043e\u0435 \u043d\u0430 \u043d\u0435\u043c \u043f\u0438\u0441\u0430\u043b, \u043e\u0442 \u201cHello, World!\u201d \u0434\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430. \u042d\u0442\u043e \u0431\u044b\u043b \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0439 \u043e\u043f\u044b\u0442.<\/p>\n<p>\u041d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0431\u044b \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c. \u0411\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u043d\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0442\u0449\u0435\u0442\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043e\u043f\u044b\u0442\u0430. \u0418 \u043d\u0435\u0434\u0435\u043b\u044e \u043d\u0430\u0437\u0430\u0434 \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u043d\u0430 YouTube \u0432\u0438\u0434\u0435\u043e, \u0433\u0434\u0435 \u0430\u0432\u0442\u043e\u0440 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431 10 \u044d\u0437\u043e\u0442\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 &#8212; \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u043d\u0438\u0445 \u0431\u044b\u043b\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c. \u0418 \u044f \u0441\u043b\u043e\u0432\u0438\u043b \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u044f\u0437\u044b\u043a. \u0422\u0430\u043a \u043d\u0430 \u0441\u0432\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u044f\u0437\u044b\u043a C42.<\/p>\n<h2>\u041e \u044f\u0437\u044b\u043a\u0435<\/h2>\n<p>C42 &#8212; \u044d\u0442\u043e \u044f\u0437\u044b\u043a, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 Assembler, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e 42 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 (\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c), \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 (int, string, float). \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0444\u0440\u0430\u0437\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/p>\n<pre><code class=\"cpp\">#1 1  41 -1 1 04 -1 \"Hello, World!\" 02 -1  #0<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u043b\u0441\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 (\u0430\u043d\u0430\u043b\u043e\u0433 \u0444\u0443\u043d\u043a\u0446\u0438\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a \u0441 \u0438\u043c\u0435\u043d\u0435\u043c 1, \u0438 \u043d\u0435 \u0441\u043f\u0440\u043e\u0441\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u0441 \u0438\u043d\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c 1 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 (\u043a\u0430\u043a \u0432 \u0442\u043e\u043c \u0436\u0435 C \u0444\u0443\u043d\u043a\u0446\u0438\u044f main), \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0430\u0447\u0430\u043b\u043e \u0431\u043b\u043e\u043a\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f <code>#1 blockID<\/code>. \u0430 \u043a\u043e\u043d\u0435\u0446 &#8212; <code>#0<\/code>. \u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u044f \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435. \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 <code>$<\/code> \u0432\u0441\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c.<\/p>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 C42 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0438\u043b\u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e\u0432\u0441\u0435). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 41 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438) \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 2 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0442 -1 \u0438 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0430 \u044f\u0447\u0435\u0439\u043a\u0430: 0 &#8212; int, 1 &#8212; string, 2 &#8212; float  <\/p>\n<h2>\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440<\/h2>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043a\u0430\u043a \u044f \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430, \u044f \u0431\u0435\u0437 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u043c, \u0434\u0430 \u0438 \u044f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u042f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0431\u0435\u0437 \u043b\u0435\u043a\u0441\u0435\u0440\u0430 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 (\u0445\u043e\u0442\u044f \u043f\u0430\u0440\u0441\u0435\u0440 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c 4 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><code>main.py<\/code> &#8212; \u043a\u0430\u043a \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>interpreter.py<\/code> &#8212; \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>exception.py<\/code> &#8212; \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<\/li>\n<li>\n<p><code>constants.py<\/code> &#8212; \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0448\u0435\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439:<\/p>\n<pre><code class=\"python\">from interpreter import Interpreter   code: str = \"\"  with open(\"code.cft\", \"r\", encoding = \"utf-8\") as file:     code = file.read()  C42 = Interpreter(code) C42.Interpret()<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e \u043a\u043b\u0430\u0441\u0441 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u0447\u0438\u0442\u0430\u044e \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u044e \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u0424\u0430\u0439\u043b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u043c, \u0432\u0441\u0435\u0433\u043e 49 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">class Error:     def __init__(self, message, line, command):         print()         if command != None:             print(f\"> {command}\")             print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 : \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 {line} : {message}\")         else:             print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 : {message}\")         exit(1)  class BlockNotFound(Error):     def __init__(self, name):         super().__init__(f\"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0431\u043b\u043e\u043a \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c {name}\", None, None) ...<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0441\u0430\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435. \u0417\u0430\u0442\u0435\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u041f\u043e \u0444\u0430\u0439\u043b\u0443 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0441\u043e\u0431\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0435\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c. \u0424\u0430\u0439\u043b \u0441 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0430 576 \u0441\u0442\u0440\u043e\u043a, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043b\u0430\u0441\u0441. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043d\u043e, \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u044d\u0442\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442. \u0412 \u0444\u0430\u0439\u043b\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430: Cell, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\">class Cell:      CELLS: list['Cell'] = []      def __init__(self, name: str, defaultValue: int | float | str, dataType: str):          cell = Cell.GetCellByName(name)         if cell != None:             Cell.CELLS.remove(cell)         Cell.CELLS.append(self)          self.name = name         self.defaultValue = defaultValue         self.value = defaultValue         self.dataType = dataType          @staticmethod     def GetCellByName(name: str) -> 'Cell':         return next((cell for cell in Cell.CELLS if cell.name == name), None)      @staticmethod     def isFloat(s):         try:              float(s)             return True         except:             return False      @staticmethod     def isInt(s):         try:              int(s)             return True         except:             return False      @staticmethod     def isString(s):         return s[0] == \"\\\"\" and s[-1] == \"\\\"\" if s != \"\" else True          @staticmethod     def isCorrectName(name: str):         return bool(re.match(r\"^-[1-9][0-9]*$\", name))          @staticmethod     def isCorrectDataType(char: str):         return char in [INT, STRING, FLOAT]<\/code><\/pre>\n<p>\u0418 \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440:<\/p>\n<pre><code class=\"python\">class Interpreter:     def __init__(self, code: str):          self.cells: list[Cell] = []          self.code = code         self.blocks: dict[list[list[str]]] = {}         self.currentLine = 0         self.currentCommand = \"\"         self.skipNextCommand = False         self.executionStack: list[list[str, bool]] = []         self.returnCalled = False          self.Parse()          def Interpret(self, blockId: str = \"1\"):         if blockId not in self.blocks:             BlockNotFound(blockId)                  self.executionStack.append([blockId, False])         idx = {block: -1 for block in self.blocks}          while self.executionStack:             currentBlock = self.executionStack.pop()             commands = self.blocks[currentBlock[0]]             blockName = currentBlock[0]             blockIsLoop = currentBlock[1]              while 1:                 idx[blockName] += 1 if not idx[blockName] + 1 > len(commands) - 1 else 0                 self.currentLine = commands[idx[blockName]][0]                 self.currentCommand = \" \".join(commands[idx[blockName]][1])                  if self.skipNextCommand:                     self.skipNextCommand = False                     continue                  nextCommand = None if idx[blockName] + 1 > len(commands) - 1 else commands[idx[blockName] + 1]                 forceExit = self.ExecuteCommand(commands[idx[blockName]][1], nextCommand)                  if self.returnCalled:                     break                 elif forceExit:                     break                 elif idx[blockName] >= len(commands) - 1:                     idx[blockName] = -1                     break              if not self.returnCalled and blockIsLoop:                 self.executionStack.append(currentBlock)                 self.returnCalled = False             elif forceExit and not idx[blockName] >= len(commands) - 1:                 self.executionStack.append(currentBlock)                 self.executionStack[-1], self.executionStack[-2] = self.executionStack[-2], self.executionStack[-1]      def ExecuteCommand(self, command, nextCommand):         CMD = command[0]          if CMD == EXIT: exit(1)                  elif CMD == PRINT:             cell = self.GetCell(self.GetArgument(1, command))             print(str(cell.value).replace(\"\\\\n\", \"\\n\"), end = \"\", flush = True)              elif CMD == INPUT:             cell = self.GetCell(self.GetArgument(1, command))             value = input()             self.ChangeValue(cell, value, False)          elif CMD == ASSIGN_VALUE:             value = self.GetArgument(2, command)             cell = self.GetCell(self.GetArgument(1, command))             self.ChangeValue(cell, value)                      ... # \u0434\u0430\u043b\u044c\u0448\u0435 \u0442\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434      def Parse(self):         lines = self.code.split('\\n')         result = {}         block = None         line_number = 1          for line in lines:             if line.startswith(START_BLOCK):                 if block != None:                     del result[block]                 words = line.split()                 if len(words) &lt;= 1 or len(words) > 2:                     block = None                     continue                 block = words[1]                 result[block] = []             elif line.startswith(END_BLOCK):                 block = None             elif block is not None and line.strip():                 parsed_line = (line_number, re.findall(r'(?:\"[^\"]*\"|[^\"\\s]+)', line))                 if '$' in parsed_line[1]:                     parsed_line = (parsed_line[0], parsed_line[1][:parsed_line[1].index('$')])                 if parsed_line[1]:                     result[block].append(parsed_line)              line_number += 1          self.blocks = result          def GetCell(self, name: str) -> Cell:         cell = Cell.GetCellByName(name)         if cell != None:             return cell         CellNotFound(self.currentLine, self.currentCommand, name)          def GetArgument(self, index: int, command: list[str]) -> str:         if index &lt;= len(command) - 1:             return command[index]         InvalidSyntax(self.currentLine, self.currentCommand)          def ChangeValue(self, cell: Cell, value: str, lookAtQuotes = True, mode = \"set\") -> bool:         if value != str:             value = str(value)          if cell.dataType == INT:             if Cell.isInt(value):                 if mode == \"set\":                     cell.value = int(value)                 elif mode == \"add\":                     cell.value += int(value)             else:                 IncorrectValue(self.currentLine, self.currentCommand, \"int\") <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-373818","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373818","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=373818"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373818\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=373818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=373818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}