From 901e73d6bd59916bc6541ea1435fe22b0408d08f Mon Sep 17 00:00:00 2001 From: Dmitry Kolomeytsev Date: Sun, 5 Oct 2025 15:55:32 +0300 Subject: [PATCH] fixed minor inconveniences --- TEMA3/report.md | 68 +++++-------------------------------------------- 1 file changed, 7 insertions(+), 61 deletions(-) diff --git a/TEMA3/report.md b/TEMA3/report.md index 9b88188..66628dd 100644 --- a/TEMA3/report.md +++ b/TEMA3/report.md @@ -566,7 +566,7 @@ False False ``` -Придумайте самостоятельно еще 2-3 примера сложных логических выражений. + ### 8.4.Проверка ссылок переменных на один и тот же объект (is). ```py w=v=10 #При таком присваивании переменные ссылаются на один и тот же объект в оперативной памяти @@ -577,18 +577,13 @@ v1=['A','B'] w1 is v1 False #Они задавались отдельно друг от друга ``` -в оперативной памяти -```py - w is v - w1=['A','B'] - v1=['A','B'] -``` ## 9. Операции с объектами, выполняемые с помощью методов. + ```py stroka='Микропроцессорная система управления' #получение полного списка атрибутов dir(stroka) -['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] +['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] ``` ### 9.1. Методы для работы со строками. ```py @@ -672,14 +667,14 @@ slvr mng={1,'a',2,'b',3,'c',4} mng.add('d') #добавление в множество mng элемента 'd' mng -{1, 2, 3, 4, 'b', 'd', 'a', 'c'} +{1, 2, 3, 'c', 4, 'a', 'b', 'd'} mng.remove(3) #удаление из множества mng элемента 3 mng -{1, 2, 4, 'b', 'd', 'a', 'c'} +{1, 2, 'c', 4, 'a', 'b', 'd'} mng1={5,'e',6} mng2=mng.union(mng1) #объединение множеств mng и mng1 mng2 -{1, 2, 4, 5, 6, 'a', 'e', 'b', 'd', 'c'} +{1, 2, 'c', 4, 5, 6, 'a', 'b', 'e', 'd'} mng3=mng2.intersection(mng) #пересечение множеств mng и mng2, получили mng так как mng входит в mng2 mng3 {1, 2, 4, 'a', 'b', 'd', 'c'} @@ -687,53 +682,4 @@ mng4=mng2.difference(mng) #разность множеств mng и mng2, пол mng4 {'e', 5, 6} ``` - -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` -```py - -``` - +## 10. Сохранил файл и закончил сеанс работы с IDLE. \ No newline at end of file