Skip to content

Commit f39015e

Browse files
authored
Update micropython-basics.md
Changes proposed to sentence structure and grammar to improve clarity
1 parent 4a6d7a3 commit f39015e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/micropython/01.basics/04.micropython-basics/micropython-basics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ Then with the `while` loop we execute the statements as long as the condition is
5757

5858
## Functions
5959

60-
A function is a block of code, a sequence of instructions composed by several statements, which runs only when it is called.
60+
A function is a block of code, a sequence of instructions comprising several statements, that runs only when it is called.
6161
You can pass the information as parameters into a function. A function can have input arguments, and can also have output parameters.
6262

63-
We can define our own functions, the most common way can be specified using the def keyword, inside the parentheses you can find the arguments if there are. Take a look to the example below:
63+
We can define our own functions. The most common way involves using the def keyword, inside the parentheses you can find the arguments if there are any. Consider the follpowing example:
6464

6565
```python
6666
def my_function():
@@ -73,7 +73,7 @@ Then you can call your function using the function name followed by parentheses:
7373
my_function()
7474
```
7575

76-
The function need two components: the header, starting with keyword def, followed by parentheses with inside the arguments and ending by colon (:) and the indented body is composed by descriptive string, function statements, return statements.
76+
The function needs two components: the header, starting with keyword def, followed by parentheses with inside the arguments and ending by colon (:) and the indented body is composed by descriptive string, function statements, return statements.
7777

7878
This script prints "Hello world!" every second. In addition, the function counter_function() increases the number every second and will be printed next to.
7979

@@ -155,4 +155,4 @@ def printFruitNames():
155155
print(fruit)
156156

157157
printFruitNames()
158-
```
158+
```

0 commit comments

Comments
 (0)