From 5b5fb9c97f8b0e9c676d5d47d4cb3663a8aa5a82 Mon Sep 17 00:00:00 2001 From: Dmitry Medvedev Date: Fri, 9 Oct 2026 00:17:52 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B2=D0=BD=D0=B5=D1=81=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B2=20=D0=94=D0=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dmedvedev/python/1.variables.ipynb | 14 ++++++++----- .../python/10.structure_of_data_dict.ipynb | 20 ++++++++++--------- .../python/8.structure_of_data_string.ipynb | 16 +++++++-------- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/dmedvedev/python/1.variables.ipynb b/dmedvedev/python/1.variables.ipynb index 955801d..4fbc64f 100644 --- a/dmedvedev/python/1.variables.ipynb +++ b/dmedvedev/python/1.variables.ipynb @@ -85,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 1, "id": "4d883f02", "metadata": {}, "outputs": [ @@ -93,8 +93,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "Тебя зовут Дима Медведев.\n", - "Твой любимый предмет - физика.\n" + "Твоя визитка:\n", + "Имя: 1\n", + "Фамилия: 2\n", + "Любимый предмет: 3\n" ] } ], @@ -103,8 +105,10 @@ "surname = input('Какая у тебя фамилия?')\n", "favorite_subject = input('Какой твой любимый предмет?')\n", "\n", - "print(f'Тебя зовут {name} {surname}.')\n", - "print(f'Твой любимый предмет - {favorite_subject}.')" + "print('Твоя визитка:')\n", + "print(f'Имя: {name}')\n", + "print(f'Фамилия: {surname}')\n", + "print(f'Любимый предмет: {favorite_subject}')" ] }, { diff --git a/dmedvedev/python/10.structure_of_data_dict.ipynb b/dmedvedev/python/10.structure_of_data_dict.ipynb index ff53107..a5ee4da 100644 --- a/dmedvedev/python/10.structure_of_data_dict.ipynb +++ b/dmedvedev/python/10.structure_of_data_dict.ipynb @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "id": "659422a3", "metadata": {}, "outputs": [ @@ -32,7 +32,7 @@ "text": [ "{'name_file': '123.py', 'format': 'py', 'size': '128kB'}\n", "123.py\n", - "\n" + "py\n" ] } ], @@ -40,7 +40,7 @@ "file_info = {'name_file':'123.py', 'format':'py', 'size':'128kB'}\n", "print(file_info)\n", "print(file_info['name_file'])\n", - "print(type(file_info))" + "print(file_info['format'])" ] }, { @@ -145,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 2, "id": "11d837f9", "metadata": {}, "outputs": [ @@ -153,6 +153,7 @@ "name": "stdout", "output_type": "stream", "text": [ + "{'rows_count': 24, 'file_format': 'csv', 'load_date': '12-12-2024'}\n", "{'file_format': 'csv', 'load_date': '12-12-2024'}\n" ] } @@ -160,6 +161,7 @@ "source": [ "dict = {'table_name':'123', 'rows_count':24, 'file_format':'csv', 'load_date':'12-12-2024'}\n", "del dict['table_name']\n", + "print(dict)\n", "dict.pop('rows_count')\n", "print(dict)" ] @@ -187,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 4, "id": "af86882d", "metadata": {}, "outputs": [ @@ -195,15 +197,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "dimasta\n", - "None\n" + "True\n", + "False\n" ] } ], "source": [ "dict = {'id':123, 'name':'dimasta', 'city':'ufa'}\n", - "print(dict.get('name'))\n", - "print(dict.get('email'))" + "print('name' in dict)\n", + "print('email' in dict)" ] }, { diff --git a/dmedvedev/python/8.structure_of_data_string.ipynb b/dmedvedev/python/8.structure_of_data_string.ipynb index 754f897..e313f1b 100644 --- a/dmedvedev/python/8.structure_of_data_string.ipynb +++ b/dmedvedev/python/8.structure_of_data_string.ipynb @@ -295,7 +295,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 1, "id": "0055f1c5", "metadata": {}, "outputs": [ @@ -303,12 +303,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "kek chebuREK\n", - "12\n", - "k\n", - "K\n", - "KEK CHEBUREK\n", - "kek cheburek\n" + "123\n", + "3\n", + "1\n", + "3\n", + "123\n", + "321\n" ] } ], @@ -319,7 +319,7 @@ "print(a[0])\n", "print(a[-1])\n", "print(a.upper())\n", - "print(a.lower())" + "print(a[::-1])" ] } ],