HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-02-26
1 <h2>Ответы</h2>
1 <h2>Ответы</h2>
2 <p>Нужно использовать ключевое слово def после которого указать:</p>
2 <p>Нужно использовать ключевое слово def после которого указать:</p>
3 <ol><li>название</li>
3 <ol><li>название</li>
4 <li>параметры в функции в скобках</li>
4 <li>параметры в функции в скобках</li>
5 <li>двоеточие, после которого будет указано тело функции</li>
5 <li>двоеточие, после которого будет указано тело функции</li>
6 <li>если функция возвращает значение, то указать оператор return</li>
6 <li>если функция возвращает значение, то указать оператор return</li>
7 </ol><p><strong>Из документации:</strong></p>
7 </ol><p><strong>Из документации:</strong></p>
8 <blockquote><p>The keyword def introduces a function<em>definition</em>. It must be followed by the function name and the parenthesized list of formal parameters. The statements that form the body of the function start at the next line, and must be indented.</p>
8 <blockquote><p>The keyword def introduces a function<em>definition</em>. It must be followed by the function name and the parenthesized list of formal parameters. The statements that form the body of the function start at the next line, and must be indented.</p>
9 </blockquote><blockquote><p>The return statement returns with a value from a function. return without an expression argument returns None. Falling off the end of a function also returns None.</p>
9 </blockquote><blockquote><p>The return statement returns with a value from a function. return without an expression argument returns None. Falling off the end of a function also returns None.</p>
10 </blockquote><p><strong>Пример функции</strong></p>
10 </blockquote><p><strong>Пример функции</strong></p>
11  
11