ответвлено от main/python-labs
Изменил(а) на 'TEMA7/report.md'
Этот коммит содержится в:
@@ -267,6 +267,17 @@ def func2(sps):
|
||||
func2(sps1)
|
||||
print(sps1)
|
||||
[1, 99, 3, 4]
|
||||
|
||||
kort=(1,2,3,4)
|
||||
func2(kort)
|
||||
Traceback (most recent call last):
|
||||
File "<pyshell#20>", line 1, in <module>
|
||||
func2(kort)
|
||||
File "<pyshell#14>", line 2, in func2
|
||||
sps[1]=99
|
||||
TypeError: 'tuple' object does not support item assignment
|
||||
|
||||
|
||||
```
|
||||
|
||||
## 5. Специальные типы пользовательских функций
|
||||
@@ -275,6 +286,7 @@ print(sps1)
|
||||
anfun1=lambda: 1.5+math.log10(17.23)
|
||||
anfun1()
|
||||
2.7362852774480286
|
||||
anfun2=lambda a,b : a+math.log10(b)
|
||||
anfun2(17,234)
|
||||
19.369215857410143
|
||||
anfun3=lambda a,b=234: a+math.log10(b)
|
||||
|
||||
Ссылка в новой задаче
Block a user