From 96c637be9a223868d7450dc692e4bad15d1742ef 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 12:05:30 +0900 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=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 | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/less1.md b/less1.md index 69cda8d..818a669 100644 --- a/less1.md +++ b/less1.md @@ -1,6 +1,7 @@ -Ссылка на урок: https://youtu.be/eRCv8uppabQ?si=u38RswCiFMWLosLv +[Ссылка на урок](https://youtu.be/eRCv8uppabQ?si=u38RswCiFMWLosLv) -Целые числа в Python +### Целые числа в Python ### +```python print(2 + 2) print(2 - 2) print(2 * 2) @@ -8,8 +9,10 @@ print(2 / 2) print("Остаток от деления", 3 % 2) print("Целая часть от деления", 9 // 4) print("Возведение в степень", 2 ** 4) +``` -Операции сравнения в Python +### Операции сравнения в Python ### +``` 1 > 1 1 < 1 1 <= 1 @@ -17,14 +20,18 @@ print("Возведение в степень", 2 ** 4) 1 != 1 1 == 1 1 < 2 < 3 +``` -Вещественные числа в Python +### Вещественные числа в Python ### +```python print(3 / 2) print(0.1) print(.1) print(.545456461218) +``` -Приведение типов в Python +### Приведение типов в Python ### +```python print(int(6.5)) print(float(6)) @@ -38,14 +45,19 @@ 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 ### +```python +product = "стол" +x, y, z = 1, 2, 3 +print(product, x, y, z) +``` -Типизация в Python +### Типизация в Python ### +```python print(type(product)) print(isinstance(product, int)) +``` [Назад на главную](readme.md) \ No newline at end of file