Skip to content

Commit 4ad8484

Browse files
committedJul 14, 2022
Included language corrections by Mikhail
1 parent 869b41c commit 4ad8484

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
 

‎Functions/Argument Order/task.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Argument Order
22

33
In the code editor, you can see a function that prints a table
4-
with a given number of rows and columns, and it can also use different
5-
symbols for printing the table. The function call below contains some errors,
4+
with a given number of rows and columns; it can also use different
5+
symbols for printing the table. The function call below contains some errors;
66
correct them so that the code prints a table like the one below:
77

88
```text

‎Functions/Definition/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It must be followed by the function name and the parenthesized list of **formal
77
The statements that form the body of the function start at the next line and must be indented.
88

99
<details>
10-
Formal parameters are enclosed in parentheses; they are the variables defined by the function that receive values when the function is called. The list consists of variable names of all the necessary values for the method. Each formal parameter is separated by a comma. When method is not accepting any input values, then the method should have an empty set of parentheses after the method name. e.g. <code>addition()</code>.
10+
Formal parameters are enclosed in parentheses; they are the variables defined by the function, which receive values when the function is called. The list consists of variable names of all the necessary values for the method. Each formal parameter is separated by a comma. When the method is not accepting any input values, it should have an empty set of parentheses after the method name, e.g., <code>addition()</code>.
1111
</details>
1212

1313
Functions only run when they are called. To call a function, use its name followed by parentheses:

‎Functions/Docstrings/task.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Docstrings
22

3-
One-line docstrings are for really obvious cases. Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.
4-
The docstring for a function or method should summarize its behavior and document its arguments, return value(s), side effects, exceptions raised, and restrictions on when it can be called (all if applicable). Optional arguments should be indicated. It should be documented whether keyword arguments are part of the interface.
3+
One-line docstrings are for really obvious cases. Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.
4+
A docstring for a function or method should summarize its behavior and document its arguments, return value(s), side effects, exceptions raised, and restrictions on when it can be called (all if applicable). Optional arguments should be indicated. It should be documented whether keyword arguments are part of the interface.
55

66

7-
Docstrings should also generally be written for modules, classes and methods definitions (you will learn about these things later on in the course). Read more about docstring conventions in the [Python PEP Guide](https://peps.python.org/pep-0257/).
7+
Docstrings should also generally be written for module, class and method definitions (you will learn about these things later on in the course). Read more about docstring conventions in the [Python PEP Guide](https://peps.python.org/pep-0257/).
88

99
### Task
1010
Add the following docstring to the function defined in the code editor:

‎Loops/Fix infinite execution/task.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Fix infinite execution
22

3-
In the code editor, there is a `while` loop, defined inside a [function](course://Functions/Definition). Please do not worry about it at the moment,
4-
you will learn about functions in the next section. The while loop inside this function
5-
would run indefinitely the way it is written at the moment
3+
In the code editor, there is a `while` loop defined inside a [function](course://Functions/Definition). Please do not worry about it at the moment,
4+
you will learn about functions in the next section. The way it is written at the moment, the while loop inside this function
5+
would run indefinitely
66
because the condition would always be `True`. You can see it for yourself by running the code. To terminate execution,
77
use the red stop button on the left side of the Run window.
88
<style>

0 commit comments

Comments
 (0)
Please sign in to comment.