Skip to content

Commit 549b2d0

Browse files
ErikSchierboomcmccandless
authored andcommitted
Format using Prettier
[Docs] Format using Prettier
1 parent 3fda708 commit 549b2d0

28 files changed

+81
-90
lines changed

exercises/concept/strings/.docs/hints.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44

55
### 1. Get message from a log line
66

7-
- Strings in Python have [lots of convenient instance methods][str-type-methods] for cleaning, splitting, manipulating, and creating new strings. Extracting values from a string could be done by splitting it based on a substring, for example.
7+
- Strings in Python have [lots of convenient instance methods][str-type-methods] for cleaning, splitting, manipulating, and creating new strings. Extracting values from a string could be done by splitting it based on a substring, for example.
88

99
### 2. Get log level from a log line
1010

11-
- Strings also have methods that help convert letters from lower to uppercase and vice-versa.
11+
- Strings also have methods that help convert letters from lower to uppercase and vice-versa.
1212

1313
### 3. Reformat a log line
1414

1515
Strings are immutable, but can be combined together to make new strings, or have elements replaced. This goal can be accomplished by using string methods, or operators like `+` or `+=` (which are overloaded to work with strings).
1616
Python also has a concept of string formatting, like many other languages.
1717

18-
- The [`str.join()`][str-join] method is useful to join an iterable of strings into one string by interspersing them with a common value, e.g. `":".join("abcde")` would create `"a:b:c:d:e"`.
19-
- [`str.format()`][str-format] is an idiomatic way to do string interpolation in Python (inserting one or more string value(s) into another).
20-
- [Format strings][format-str] are another convenient way to interpolate values into a string. This strategy is particularly useful when more than one named variable needs to be inserted into a final output.
18+
- The [`str.join()`][str-join] method is useful to join an iterable of strings into one string by interspersing them with a common value, e.g. `":".join("abcde")` would create `"a:b:c:d:e"`.
19+
- [`str.format()`][str-format] is an idiomatic way to do string interpolation in Python (inserting one or more string value(s) into another).
20+
- [Format strings][format-str] are another convenient way to interpolate values into a string. This strategy is particularly useful when more than one named variable needs to be inserted into a final output.
2121

22-
[python-str-doc]: https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str
23-
[str-type-methods]: https://docs.python.org/3/library/stdtypes.html#str
24-
[str-join]: https://docs.python.org/3/library/stdtypes.html#str.join
25-
[str-format]: https://docs.python.org/3/library/stdtypes.html#str.format
26-
[format-str]: https://docs.python.org/3/library/string.html#formatstrings
22+
[python-str-doc]: https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str
23+
[str-type-methods]: https://docs.python.org/3/library/stdtypes.html#str
24+
[str-join]: https://docs.python.org/3/library/stdtypes.html#str.join
25+
[str-format]: https://docs.python.org/3/library/stdtypes.html#str.format
26+
[format-str]: https://docs.python.org/3/library/string.html#formatstrings

exercises/concept/strings/.meta/design.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The goal of this exercise is to teach the student about Python strings, and fami
66

77
## Things to teach
88

9-
- Know that Python has a `str` type.
10-
- Know how to find items in a string.
11-
- Know how to manipulate strings to create new strings.
12-
- Familiarize one's self with string instance methods in Python.
13-
- Learn about string formatting.
9+
- Know that Python has a `str` type.
10+
- Know how to find items in a string.
11+
- Know how to manipulate strings to create new strings.
12+
- Familiarize one's self with string instance methods in Python.
13+
- Learn about string formatting.
1414

1515
## Things not to teach
1616

@@ -21,11 +21,11 @@ The goal of this exercise is to teach the student about Python strings, and fami
2121

2222
The Concepts this exercise unlocks are:
2323

24-
- `strings-basic`: know about `str` type in Python, know some basic methods, know about formatting.
24+
- `strings-basic`: know about `str` type in Python, know some basic methods, know about formatting.
2525

2626
## Prerequisites
2727

28-
- `functions`: The student should be familiar with creating functions.
28+
- `functions`: The student should be familiar with creating functions.
2929

3030
## Representer
3131

reference/concepts/argument_unpacking.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
TODO: ADD MORE
44

55
- the example solution for this exercise uses `splat` (`*`) to unpack rows for the `zip()` function. [matrix](../exercise-concepts/matrix.md)
6-

reference/concepts/assignment.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ TODO: ADD MORE
55
- The example solution uses assignment for variables and other values. [markdown](../exercise-concepts/markdown.md)
66
- instance properties need to be assigned passed in data [matrix](../exercise-concepts/matrix.md)
77
- the example uses assignment for all the instance properties and `instructions` dictionary. [robot-simulator](../exercise-concepts/robot-simulator.md)
8-

reference/concepts/builtin_functions/len.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ See [docs][docs].
99
[docs]: https://docs.python.org/3/library/functions.html#len
1010
[hamming]: ../../exercise-concepts/hamming.md
1111
[variable-length-quantity]: ../../exercise-concepts/variable-length-quantity.md
12-

reference/concepts/builtin_functions/zip.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ See [docs][docs].
99
[docs]: https://docs.python.org/3/library/functions.html#zip
1010
[hamming]: ../../exercise-concepts/hamming.md
1111
[matrix]: ../../exercise-concepts/matrix.md
12-

reference/concepts/builtin_types/bytearray.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ TODO: ADD MORE DETAIL
55
See the Python documentation entries for the [binary sequence types][docs-binary-sequence-types], of which [`bytearray`][docs-bytearray-type] is the [mutable][mutation] member. You'll also want to familiarize yourself with the use of [`bytearray` as a casting function][docs-bytearray-as-function], as well as the many [common binary sequence methods][docs-binary-sequence-methods] and [mutable sequence methods][docs-mutable-sequence-methods] available to use on the type.
66

77
[mutation]: ../../../../../reference/concepts/mutation.md
8-
98
[docs-binary-sequence-types]: https://docs.python.org/3/library/stdtypes.html#binaryseq
109
[docs-bytearray-type]: https://docs.python.org/3/library/stdtypes.html#typebytearray
1110
[docs-bytearray-as-function]: https://docs.python.org/3/library/stdtypes.html#bytearray

reference/concepts/builtin_types/frozenset.md

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

33
TODO: ADD MORE DETAIL
44

5-
See the Python documentation entries for the [`set`][docs-set] collection, the [immutable] [set type][docs-set-type]; essentially a [hash map][hash-map] in which only the key is relevant, and which disallows [mutaion][mutation] of keys after intialization.
5+
See the Python documentation entries for the [`set`][docs-set] collection, the [immutable][set type][docs-set-type]; essentially a [hash map][hash-map] in which only the key is relevant, and which disallows [mutaion][mutation] of keys after intialization.
66

77
[immutable]: ../../../../../reference/concepts/immutability.md
88
[mutation]: ../../../../../reference/concepts/mutation.md

reference/concepts/builtin_types/list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `list`
22

3-
Lists are dynamic arrays that can be resized by Python at runtime. They are homogenous, meaning they are able to hold any data type, including other lists, and can even contain themselves (recursive data structures are relatively simple in Python).
3+
Lists are dynamic arrays that can be resized by Python at runtime. They are homogenous, meaning they are able to hold any data type, including other lists, and can even contain themselves (recursive data structures are relatively simple in Python).
44

55
Simple flat lists are used extensively in [variable-length-quantity][variable-length-quantity], [markdown][markdown], and [robot-simulator][robot-simulator].
66

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `range`
22

3-
The `range()` built-in represents an immutable sequence of numbers (or any object that implements the __index__ dunder method). Used in the [markdown][markdown] to control the number of loops while iterating through a passed-in line or list. Used in [robot-simulator][robot-simulator] to represent the values from zero to 3 as assigned to NORTH, EAST, SOUTH, WEST.
3+
The `range()` built-in represents an immutable sequence of numbers (or any object that implements the **index** dunder method). Used in the [markdown][markdown] to control the number of loops while iterating through a passed-in line or list. Used in [robot-simulator][robot-simulator] to represent the values from zero to 3 as assigned to NORTH, EAST, SOUTH, WEST.
44

55
TODO: ADD MORE DETAIL
66

@@ -10,6 +10,5 @@ See the Python documentation entries for the [immutable][immutable] [`range` typ
1010
[docs-range-type]: https://docs.python.org/3/library/stdtypes.html#typesseq-range
1111
[docs-range-as-function]: https://docs.python.org/3/library/stdtypes.html#range
1212
[docs-sequence-types]: https://docs.python.org/3/library/stdtypes.html#typesseq
13-
1413
[markdown]: ../../exercise-concepts/markdown.md
1514
[robot-simulator]: ../../exercise-concepts/robot-simulator.md

0 commit comments

Comments
 (0)