внесены исправления в ДЗ
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": 1,
|
||||||
"id": "4d883f02",
|
"id": "4d883f02",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -93,8 +93,10 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Тебя зовут Дима Медведев.\n",
|
"Твоя визитка:\n",
|
||||||
"Твой любимый предмет - физика.\n"
|
"Имя: 1\n",
|
||||||
|
"Фамилия: 2\n",
|
||||||
|
"Любимый предмет: 3\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -103,8 +105,10 @@
|
|||||||
"surname = input('Какая у тебя фамилия?')\n",
|
"surname = input('Какая у тебя фамилия?')\n",
|
||||||
"favorite_subject = input('Какой твой любимый предмет?')\n",
|
"favorite_subject = input('Какой твой любимый предмет?')\n",
|
||||||
"\n",
|
"\n",
|
||||||
"print(f'Тебя зовут {name} {surname}.')\n",
|
"print('Твоя визитка:')\n",
|
||||||
"print(f'Твой любимый предмет - {favorite_subject}.')"
|
"print(f'Имя: {name}')\n",
|
||||||
|
"print(f'Фамилия: {surname}')\n",
|
||||||
|
"print(f'Любимый предмет: {favorite_subject}')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 1,
|
||||||
"id": "659422a3",
|
"id": "659422a3",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"text": [
|
"text": [
|
||||||
"{'name_file': '123.py', 'format': 'py', 'size': '128kB'}\n",
|
"{'name_file': '123.py', 'format': 'py', 'size': '128kB'}\n",
|
||||||
"123.py\n",
|
"123.py\n",
|
||||||
"<class 'dict'>\n"
|
"py\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"file_info = {'name_file':'123.py', 'format':'py', 'size':'128kB'}\n",
|
"file_info = {'name_file':'123.py', 'format':'py', 'size':'128kB'}\n",
|
||||||
"print(file_info)\n",
|
"print(file_info)\n",
|
||||||
"print(file_info['name_file'])\n",
|
"print(file_info['name_file'])\n",
|
||||||
"print(type(file_info))"
|
"print(file_info['format'])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": 2,
|
||||||
"id": "11d837f9",
|
"id": "11d837f9",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -153,6 +153,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
|
"{'rows_count': 24, 'file_format': 'csv', 'load_date': '12-12-2024'}\n",
|
||||||
"{'file_format': 'csv', 'load_date': '12-12-2024'}\n"
|
"{'file_format': 'csv', 'load_date': '12-12-2024'}\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -160,6 +161,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"dict = {'table_name':'123', 'rows_count':24, 'file_format':'csv', 'load_date':'12-12-2024'}\n",
|
"dict = {'table_name':'123', 'rows_count':24, 'file_format':'csv', 'load_date':'12-12-2024'}\n",
|
||||||
"del dict['table_name']\n",
|
"del dict['table_name']\n",
|
||||||
|
"print(dict)\n",
|
||||||
"dict.pop('rows_count')\n",
|
"dict.pop('rows_count')\n",
|
||||||
"print(dict)"
|
"print(dict)"
|
||||||
]
|
]
|
||||||
@@ -187,7 +189,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 4,
|
||||||
"id": "af86882d",
|
"id": "af86882d",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -195,15 +197,15 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"dimasta\n",
|
"True\n",
|
||||||
"None\n"
|
"False\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"dict = {'id':123, 'name':'dimasta', 'city':'ufa'}\n",
|
"dict = {'id':123, 'name':'dimasta', 'city':'ufa'}\n",
|
||||||
"print(dict.get('name'))\n",
|
"print('name' in dict)\n",
|
||||||
"print(dict.get('email'))"
|
"print('email' in dict)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -295,7 +295,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 14,
|
"execution_count": 1,
|
||||||
"id": "0055f1c5",
|
"id": "0055f1c5",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -303,12 +303,12 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"kek chebuREK\n",
|
"123\n",
|
||||||
"12\n",
|
"3\n",
|
||||||
"k\n",
|
"1\n",
|
||||||
"K\n",
|
"3\n",
|
||||||
"KEK CHEBUREK\n",
|
"123\n",
|
||||||
"kek cheburek\n"
|
"321\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
"print(a[0])\n",
|
"print(a[0])\n",
|
||||||
"print(a[-1])\n",
|
"print(a[-1])\n",
|
||||||
"print(a.upper())\n",
|
"print(a.upper())\n",
|
||||||
"print(a.lower())"
|
"print(a[::-1])"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user