|
|
|
Помогите с тестовым заданием
|
|||
|---|---|---|---|
|
#18+
Выскажите ваше мнение, у меня нет предположений -( Q: how do you make a variables only accessible within a function but cause the value to persist across calls to that function Answer: 1) Add a positional argument, with an empty tuple as default value, to the end of the argument list 2) Encapsulate access to the variable within set_x() and get_y() functions 3) Create a global variable at the veginning of the module and add the private declaration to that variable within the function 4) Create a global variable at the beginning of the module and add the "static" declaration to that variable within the function 5) Add the keyword argument, with a mutable a default value to the end of the function parameret list ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 08.04.2018, 19:15:14 |
|
||
|
Помогите с тестовым заданием
|
|||
|---|---|---|---|
|
#18+
в PHP в функции к переменной добавляется модификатор static и тогда при след. вызове функции в переменной будет то значение, которое было при выходе из функции ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 08.04.2018, 22:17:53 |
|
||
|
|

start [/forum/search_topic.php?author=netmisty&author_mode=last_topics&do_search=1]: |
0ms |
get settings: |
7ms |
get forum list: |
12ms |
get settings: |
5ms |
get forum list: |
14ms |
get settings: |
7ms |
get forum list: |
18ms |
get settings: |
8ms |
get forum list: |
12ms |
get settings: |
8ms |
get forum list: |
14ms |
get settings: |
10ms |
get forum list: |
17ms |
get settings: |
7ms |
get forum list: |
16ms |
get settings: |
7ms |
get forum list: |
10ms |
get settings: |
6ms |
get forum list: |
14ms |
get settings: |
8ms |
get forum list: |
13ms |
get settings: |
9ms |
get forum list: |
16ms |
get settings: |
9ms |
get forum list: |
13ms |
get settings: |
8ms |
get forum list: |
12ms |
get settings: |
8ms |
get forum list: |
19ms |
get settings: |
10ms |
get forum list: |
18ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
44ms |
get topic data: |
11ms |
get first new msg: |
7ms |
get forum data: |
3ms |
get page messages: |
52ms |
get tp. blocked users: |
2ms |
| others: | 12153ms |
| total: | 12613ms |

| 0 / 0 |
