From f6d48382a445676f7c1c9847420b2ca3e41981e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=92=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=82=D0=B8=D0=BD=D0=BE=D0=B2=D0=B8=D1=87=20?= =?UTF-8?q?=D0=96=D0=B5=D0=B1=D1=80=D0=B8=D0=BA=D0=BE=D0=B2?= Date: Wed, 24 Apr 2024 10:42:50 +0900 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20less1.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- less1.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 less1.md diff --git a/less1.md b/less1.md new file mode 100644 index 0000000..8f4ebe6 --- /dev/null +++ b/less1.md @@ -0,0 +1,49 @@ +Ссылка на урок: https://youtu.be/eRCv8uppabQ?si=u38RswCiFMWLosLv + +Целые числа в Python +print(2 + 2) +print(2 - 2) +print(2 * 2) +print(2 / 2) +print("Остаток от деления", 3 % 2) +print("Целая часть от деления", 9 // 4) +print("Возведение в степень", 2 ** 4) + +Операции сравнения в Python +1 > 1 +1 < 1 +1 <= 1 +1 >= 1 +1 != 1 +1 == 1 +1 < 2 < 3 + +Вещественные числа в Python +print(3 / 2) +print(0.1) +print(.1) +print(.545456461218) + +Приведение типов в Python +print(int(6.5)) +print(float(6)) + +str_1 = "это строка 1" +str_2 = 'это строка 2' + +print(str_1 + str_2) +print(str_1 * 3) +print(str_1 == str_2) +print(str_1[0]) +print(str_1[0:3]) +print(str_1[-1]) +print(len(str_1)) + +Переменные в Python +product = "стол" +x, y, z = 1, 2, 3 +print(product, x, y, z) + +Типизация в Python +print(type(product)) +print(isinstance(product, int)) \ No newline at end of file