Skip to content

Commit fe848a0

Browse files
feat(curriculum): add content to python chapter review (freeCodeCamp#62440)
1 parent 9d55801 commit fe848a0

File tree

4 files changed

+2919
-10
lines changed

4 files changed

+2919
-10
lines changed

curriculum/challenges/english/blocks/lecture-introduction-to-python/67fe859a00971c34a23abd43.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ print('Integer:', my_integer_var) # Integer: 10
3838

3939
```python
4040
my_float_var = 4.50
41-
print('Float:', my_float_var) # Float 4.50
41+
print('Float:', my_float_var) # Float: 4.50
4242
```
4343

4444
- Complex: A number with a real and imaginary part, like `6 + 7j`.

curriculum/challenges/english/blocks/review-loops-and-sequences/67f39b91583dec1e1eddbb9e.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ for index, language in enumerate(languages):
603603
languages = ['Spanish', 'English', 'Russian', 'Chinese']
604604

605605
print(list(enumerate(languages)))
606+
# [(0, 'Spanish'), (1, 'English'), (2, 'Russian'), (3, 'Chinese')]
606607
```
607608

608609
- The `enumerate()` function also accepts an optional `start` argument that specifies the starting value for the count. If this argument is omitted, then the count will begin at `0`.

curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ age = 25
4242
# This is a single line comment
4343
```
4444

45-
- **Multi-line Strings**: These types of strings can be used to leave larger notes or to comment out sections of code
45+
- **Multi-line Strings**: These types of strings can be used to leave larger notes or to comment out sections of code.
4646

4747
```py
4848
"""
@@ -74,7 +74,7 @@ print('Integer:', my_integer_var) # Integer: 10
7474

7575
```py
7676
my_float_var = 4.50
77-
print('Float:', my_float_var) # Float 4.50
77+
print('Float:', my_float_var) # Float: 4.50
7878
```
7979

8080
- **Complex**: A number with a real and imaginary part:
@@ -288,7 +288,7 @@ replaced_my_str = greeting.replace('hello', 'hi')
288288
print(replaced_my_str) # 'hi world'
289289
```
290290

291-
- **`str.split()`**: This is used to split a string into a list using a specified separator. A separator is a string specifying where the split should happen.
291+
- **`split()`**: This is used to split a string into a list using a specified separator. A separator is a string specifying where the split should happen.
292292

293293
```py
294294
dashed_name = 'example-dashed-name'
@@ -297,7 +297,7 @@ split_words = dashed_name.split('-')
297297
print(split_words) # ['example', 'dashed', 'name']
298298
```
299299

300-
- **`str.join()`**: This is used to join elements of an iterable into a string with a separator. An iterable is a collection of elements that can be looped over like a list, string or a tuple.
300+
- **`join()`**: This is used to join elements of an iterable into a string with a separator. An iterable is a collection of elements that can be looped over like a list, string or a tuple.
301301

302302
```py
303303
example_list = ['example', 'dashed', 'name']

0 commit comments

Comments
 (0)