Skip to content

Commit 166a0d8

Browse files
authored
Change 'amount' to 'number' for countables (#3526)
This is a follow-up to #3517 I've fixed the following occurrences: - number of values - number of digits - number of function calls - number of hours - number of health points - number of (intermediate) delivery points - number of keyword arguments - number of grains - number of names I have also verified that the following are correct: - amount of reputation - amount of work - amount of functionality - amount of memory - amount of money - amount of domestic currency - amount of tree climbing - amount of energy [no important files changed]
1 parent 358e406 commit 166a0d8

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

concepts/function-arguments/about.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ For instance, `*` is used for multiplication, it is used for unpacking, and it i
182182
Since a tuple can be iterated, `args` can be passed to any other function which takes an iterable.
183183
Although `*args` is commonly juxtaposed with `**kwargs`, it doesn't have to be.
184184

185-
Following is an example of an arbitrary amount of values being passed to a function:
185+
Following is an example of an arbitrary number of values being passed to a function:
186186

187187
```python
188188

@@ -196,7 +196,7 @@ Following is an example of an arbitrary amount of values being passed to a funct
196196

197197
If `*args` follows one or more positional arguments, then `*args` will be what is left over after the positional arguments.
198198

199-
Following is an example of an arbitrary amount of values being passed to a function after a positional argument:
199+
Following is an example of an arbitrary number of values being passed to a function after a positional argument:
200200

201201
```python
202202

@@ -210,7 +210,7 @@ Following is an example of an arbitrary amount of values being passed to a funct
210210

211211
If one or more default arguments are defined after `*args` they are separate from the `*args` values.
212212

213-
To put it all together is an example of an arbitrary amount of values being passed to a function that also has a positional argument and a default argument:
213+
To put it all together is an example of an arbitrary number of values being passed to a function that also has a positional argument and a default argument:
214214

215215
```python
216216

@@ -228,7 +228,7 @@ To put it all together is an example of an arbitrary amount of values being pass
228228

229229
```
230230

231-
Note that when an argument is already in an iterable, such as a tuple or list, it needs to be unpacked before being passed to a function that takes an arbitrary amount of separate arguments.
231+
Note that when an argument is already in an iterable, such as a tuple or list, it needs to be unpacked before being passed to a function that takes an arbitrary number of separate arguments.
232232
This is accomplished by using `*`, which is the [unpacking operator][unpacking operator].
233233

234234
`*` in this context _unpacks_ the container into its separate elements which are then transformed by `*args` into a tuple.
@@ -257,7 +257,7 @@ The `**` transforms the group of named arguments into a [`dictionary`][dictionar
257257
Since a dictionary can be iterated, `kwargs` can be passed to any other function which takes an iterable.
258258
Although `**kwargs` is commonly juxtaposed with `*args`, it doesn't have to be.
259259

260-
Following is an example of an arbitrary amount of key-value pairs being passed to a function:
260+
Following is an example of an arbitrary number of key-value pairs being passed to a function:
261261

262262
```python
263263
>>> def add(**kwargs):
@@ -271,7 +271,7 @@ Note that the `dict.values()` method is called to iterate through the `kwargs` d
271271

272272
When iterating a dictionary the default is to iterate the keys.
273273

274-
Following is an example of an arbitrary amount of key-value pairs being passed to a function that then iterates over `kwargs.keys()`:
274+
Following is an example of an arbitrary number of key-value pairs being passed to a function that then iterates over `kwargs.keys()`:
275275

276276
```python
277277
>>> def concat(**kwargs):

concepts/numbers/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ This means calculations within `()` have the highest priority, followed by `**`,
177177

178178
## Precision & Representation
179179

180-
Integers in Python have [arbitrary precision][arbitrary-precision] -- the amount of digits is limited only by the available memory of the host system.
180+
Integers in Python have [arbitrary precision][arbitrary-precision] -- the number of digits is limited only by the available memory of the host system.
181181

182182
Floating point numbers are usually implemented using a `double` in C (_15 decimal places of precision_), but will vary in representation based on the host system.
183183
Complex numbers have a `real` and an `imaginary` part, both of which are represented by floating point numbers.

concepts/recursion/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Recursion can be viewed as another way to loop/iterate.
66
And like looping, a Boolean expression or `True/False` test is used to know when to stop the recursive execution.
77
_Unlike_ looping, recursion without termination in Python cannot not run infinitely.
88
Values used in each function call are placed in their own frame on the Python interpreter stack.
9-
If the total amount of function calls takes up more space than the stack has room for, it will result in an error.
9+
If the total number of function calls takes up more space than the stack has room for, it will result in an error.
1010

1111
## Looping vs Recursive Implementation
1212

concepts/recursion/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ It can be viewed as another way to loop/iterate.
55
Like looping, a Boolean expression or `True/False` test is used to know when to stop the recursive execution.
66
_Unlike_ looping, recursion without termination in Python cannot not run infinitely.
77
Values used in each function call are placed in their own frame on the Python interpreter stack.
8-
If the total amount of function calls takes up more space than the stack has room for, it will result in an error.
8+
If the total number of function calls takes up more space than the stack has room for, it will result in an error.
99

1010
```python
1111
def print_increment(step, max_value):

exercises/concept/electric-bill/.docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ This means calculations within `()` have the highest priority, followed by `**`,
150150

151151
## Precision & Representation
152152

153-
Integers in Python have [arbitrary precision][arbitrary-precision] -- the amount of digits is limited only by the available memory of the host system.
153+
Integers in Python have [arbitrary precision][arbitrary-precision] -- the number of digits is limited only by the available memory of the host system.
154154

155155
Floating point numbers are usually implemented using a `double` in C (_15 decimal places of precision_), but will vary in representation based on the host system.
156156
Complex numbers have a `real` and an `imaginary` part, both of which are represented by floating point numbers.

exercises/concept/electric-bill/.meta/exemplar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33

44
def get_extra_hours(hours):
5-
"""Return the amount of hours.
5+
"""Return the number of hours.
66
7-
:param: hours: int - amount of hours.
8-
:return: int - amount of "extra" hours.
7+
:param: hours: int - number of hours.
8+
:return: int - number of "extra" hours.
99
"""
1010

1111
return (hours + 3) % 24

exercises/concept/electric-bill/electric_bill.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33

44
def get_extra_hours(hours):
5-
"""Return the amount of hours.
5+
"""Return the number of hours.
66
7-
:param: hours: int - amount of hours.
8-
:return: int - amount of "extra" hours.
7+
:param: hours: int - number of hours.
8+
:return: int - number of "extra" hours.
99
"""
1010
pass
1111

exercises/concept/ellens-alien-game/.meta/exemplar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Alien:
99
(class)total_aliens_created: int
1010
x_coordinate: int - Position on the x-axis.
1111
y_coordinate: int - Position on the y-axis.
12-
health: int - Amount of health points.
12+
health: int - Number of health points.
1313
1414
Methods
1515
-------

exercises/concept/ellens-alien-game/classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Alien:
99
(class)total_aliens_created: int
1010
x_coordinate: int - Position on the x-axis.
1111
y_coordinate: int - Position on the y-axis.
12-
health: int - Amount of health points.
12+
health: int - Number of health points.
1313
1414
Methods
1515
-------

exercises/concept/locomotive-engineer/.docs/hints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## 3. Add missing stops
1818

19-
- Using `**kwargs` as a function parameter will allow an arbitrary amount of keyword arguments to be passed.
19+
- Using `**kwargs` as a function parameter will allow an arbitrary number of keyword arguments to be passed.
2020
- Using `**<dict>` as an argument will unpack a dictionary into keyword arguments.
2121
- You can put keyword arguments in a `{}` or `dict()`.
2222
- To get the values out of a dictionary, you can use the `<dict>.values()` method.

0 commit comments

Comments
 (0)