fix(curriculum): replace 'method' with 'function' for module calls in… (#66395)

This commit is contained in:
Bảo Nguyễn
2026-03-12 21:58:53 +07:00
committed by GitHub
parent 42ca533939
commit 96b8af5e0f
3 changed files with 6 additions and 6 deletions

View File

@@ -54,10 +54,10 @@ Let's say that you want to import the `math` module. In that case, you would wri
import math
```
Then, if you need to call a method from that module in your Python script, you would use dot notation, with the name of the module followed by the name of the method:
Then, if you need to call a function from that module in your Python script, you would use dot notation, with the name of the module followed by the name of the function:
```python
module_name.method_name()
module_name.function_name()
```
For example, to get the square root of 36, you would write `math` followed by a dot and then `sqrt`, an abbreviation of square root, and within parentheses, you would pass any necessary arguments. In this case, we only need to pass in the number we want the square root of:

View File

@@ -313,10 +313,10 @@ print(5 in my_set) # True
import module_name
```
Then, if you need to call a method from that module, you would use dot notation, with the name of the module followed by the name of the method.
Then, if you need to call a function from that module, you would use dot notation, with the name of the module followed by the name of the function.
```python
module_name.method_name()
module_name.function_name()
```
For example, you would write the following in your code to import the `math` module and get the square root of 36:

View File

@@ -1862,10 +1862,10 @@ print(5 in my_set)
import module_name
```
Then, if you need to call a method from that module, you would use dot notation, with the name of the module followed by the name of the method.
Then, if you need to call a function from that module, you would use dot notation, with the name of the module followed by the name of the function.
```python
module_name.method_name()
module_name.function_name()
```
For example, you would write the following in your code to import the `math` module and get the square root of 36: