From 93c6b638d707fe2997f4ef98e7a1fd4eb887e9a9 Mon Sep 17 00:00:00 2001 From: joker Date: Fri, 29 Sep 2023 07:33:35 +0300 Subject: [PATCH] modified: content/posts/informatics/ms-word.mdx modified: content/posts/informatics/python-task.mdx modified: content/posts/informatics/python-well.mdx --- content/posts/informatics/ms-word.mdx | 6 +++--- content/posts/informatics/python-task.mdx | 17 ++++++++++++++++- content/posts/informatics/python-well.mdx | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/content/posts/informatics/ms-word.mdx b/content/posts/informatics/ms-word.mdx index 7c1bed5..3d9571b 100644 --- a/content/posts/informatics/ms-word.mdx +++ b/content/posts/informatics/ms-word.mdx @@ -15,7 +15,7 @@ tags: -# Урок - 1 +# Урок-1 Создание таблице @@ -43,7 +43,7 @@ tags: /> -# Урок - 2 +# Урок-2 Создание списков **Маркированный**, **Нумерованный**, **Многоуровневый** @@ -93,7 +93,7 @@ tags: src={`/informatica/4_5/video.mp4`} /> -# Урок - 3 +# Урок-3 Преобразование отсканированных документов и изображений в редактируемые форматы Word, Pdf, Excel и Txt (простой текст) diff --git a/content/posts/informatics/python-task.mdx b/content/posts/informatics/python-task.mdx index 8d5414b..1c78ba7 100644 --- a/content/posts/informatics/python-task.mdx +++ b/content/posts/informatics/python-task.mdx @@ -22,4 +22,19 @@ tags: * (1,2,3) после увеличения (1,2,4) * (9) после увеличения (1,0) -## Залача 2 \ No newline at end of file +## Залача 2 + +На вход дается целочисленный массив nums, переместите все 0 в его конец, сохраняя относительный порядок ненулевых элементов. +Обратите внимание, что вы должны сделать это на месте, не копируя массив. + +Example 1: + +Input: nums = [0,1,0,3,12] + +Output: [1,3,12,0,0] + +Example 2: + +Input: nums = [0] + +Output: [0] \ No newline at end of file diff --git a/content/posts/informatics/python-well.mdx b/content/posts/informatics/python-well.mdx index 086f2f1..039fe74 100644 --- a/content/posts/informatics/python-well.mdx +++ b/content/posts/informatics/python-well.mdx @@ -111,7 +111,7 @@ tags: print(S[-2]) # Второй элемент с конца в S # a - print(S[len(S)-l]) # Отрицательная индексация, сложный путь + print(S[len(S)-1]) # Отрицательная индексация, сложный путь # m print(S[1:3]) # Срез S со смещения 1 до 2 (не 3) # 'pa' @@ -151,7 +151,7 @@ tags: print(S) # TypeError: 'str' object does not support item assignment - S = 'z' + S[ 1:] # Но мы можем выполнять выражения для создания новых объектов + S = 'z' + S[1:] # Но мы можем выполнять выражения для создания новых объектов print(S) # 'zpam’ @@ -167,7 +167,7 @@ tags: # ['s', 'h', 'г', 'u', 'b', 'b', 'e', 'r', 'y'J L[1] = 'с' # Изменить на месте - '' .join(L) # Объединить с пустым разделителем + ''.join(L) # Объединить с пустым разделителем print(L) # scrubbery