Skip to content

Commit 3fd51d0

Browse files
author
Colin Leach
committed
minor edits
1 parent 47592ca commit 3fd51d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exercises/practice/flower-field/.approaches/introduction.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ It is possible to break the exercise down into a series of sub-tasks, with plent
1313

1414
Core Python does not support matrices, nor N-dimensional arrays more generally, though these are at the heart of many third-party packages such as NumPy.
1515

16-
Thus, the input board and the final result are implemented as lists of strings, though intermediate processing is likely to use lists of lists plus a final `''.join()` for each row in the `return` statement.
16+
Thus, the input board and the final result are implemented as lists of strings.
17+
Intermediate processing is likely to use lists of lists, plus a final `''.join()` for each row in the `return` statement.
1718

1819
Helpfully, Python can iterate over strings exactly like lists.
1920

@@ -76,7 +77,7 @@ This can be made to work, but quickly becomes very verbose.
7677
return len([adj for adj in neighbors if adj == '*'])
7778
```
7879

79-
Slightly better, this lists all the possibilities then filters out any that fall outside the board.
80+
This lists all the possibilities, then filters out any squares that fall outside the board.
8081

8182
Note that we only want a _count_ of nearby flowers.
8283
Their precise _location_ is irrelevant.
@@ -137,7 +138,7 @@ The example below is an object-oriented approach using complex numbers, included
137138
All validation checks are done in the object constructor.
138139

139140
```python
140-
"""Flower Garden."""
141+
"""Flower Field."""
141142

142143
# The import is only needed for type annotation, so can be considered optional.
143144
from typing import Generator

0 commit comments

Comments
 (0)