|
|
|
|
@ -248,6 +248,7 @@ TypeError: unsupported operand type(s) for %: 'complex' and 'complex'
|
|
|
|
|
-10
|
|
|
|
|
```
|
|
|
|
|
Почему результат отрицательный - используется дополнительный код для представления отрицательных чисел
|
|
|
|
|
|
|
|
|
|
5.2 Двоичное «И»:
|
|
|
|
|
```py
|
|
|
|
|
>>> 7&9 # 111 и 1001 = 0001
|
|
|
|
|
@ -546,7 +547,6 @@ dict_keys(['name', 'age', 'city', 'courses', 'sr'])
|
|
|
|
|
>>> student.values()
|
|
|
|
|
dict_values(['Dima', 20, 'Moscow', ['Math', 'Physics'], 3.01])
|
|
|
|
|
>>> student["sr"] = 4.1
|
|
|
|
|
...
|
|
|
|
|
>>> student
|
|
|
|
|
{'name': 'Dima', 'age': 20, 'city': 'Moscow', 'courses': ['Math', 'Physics'], 'sr': 4.1}
|
|
|
|
|
>>> student.clear()
|
|
|
|
|
|