Skip to content

Commit 5ab8f13

Browse files
committedDec 19, 2023
Add changes to Data structures lesson
1 parent 2914d21 commit 5ab8f13

File tree

10 files changed

+22
-3
lines changed

10 files changed

+22
-3
lines changed
 

Diff for: ‎Data structures/Dictionaries/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ You can access a value in a dictionary similarly to how you would access a value
2525
but using a key instead of an index. More info about this data structure can be found
2626
<a href="https://docs.python.org/3/tutorial/datastructures.html#dictionaries">here</a>.
2727

28+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6481).
29+
2830
Add Jared's (`"Jared"`) number `570` to the phone book.
2931
Remove Gerard's number from the phone book.
3032
Print Jane's phone number from the `phone_book`.

Diff for: ‎Data structures/Dictionary keys() and values()/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ followed by a dot.
1414

1515
Read more about the operations that dictionaries support <a href="https://docs.python.org/3/library/stdtypes.html#typesmapping">here</a>.
1616

17+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096).
18+
1719
Print all values from the `phone_book` .
1820

1921
<div class='hint'>Use the method <code>values()</code>.</div>

Diff for: ‎Data structures/Dictionary keys/task.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
Try to figure out what's wrong with this dictionary and fix it.
44

5-
<div class="hint">Remember that dictionary keys can only be immutable types? You could replace the list with several individual key:value pairs with
6-
keys of type <code>str</code> or with a tuple.</div>
7-
<div class="hint">Remember that keys need to be unique? You could rename one of the 'Bob' keys.</div>
5+
When fixing, be aware of the following requirements
6+
- Since the dictionary keys can be only immutable types, replace the list with several individual `key:value` pairs with keys of type `str` or with a tuple.
7+
- Since the keys need to be unique, rename one of the 'Bob' keys to any name you want.

Diff for: ‎Data structures/In keyword/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ item. You can apply `in` to lists or dictionaries the same way you did it with s
88

99
Please complete the task in the specified order.
1010

11+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096).
12+
1113
<div class="hint">Use the <code>in</code> keyword.</div>
1214

1315
<div class="hint">Use the <code>.values()</code> and <code>.keys()</code> attributes.</div>

Diff for: ‎Data structures/Join method/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ aa = bb = cc
3333
Python is a programming language
3434
```
3535

36+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6972#join-a-list).
37+
3638
Assign a value to the `joined` variable such that the `print` statement prints the following:
3739
```text
3840
I like apples and I like bananas and I like peaches and I like grapes

Diff for: ‎Data structures/List items/task.md

+3
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ animals[:] = []
88
```
99

1010
Make all `animals` elephants by replacing the last two items.
11+
We suggest that you first run the program in the IDE without changes to see how the `animals` list looks like after all the operations have been made
1112

1213
<div class='hint'>Use assignment to a slice as in examples.</div>
14+
15+
<div class='hint'>You can assign a list consisting of several elements.</div>

Diff for: ‎Data structures/Lists introduction/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ squares + [36, 49, 64, 81, 100]
1717

1818
You can explore lists in more detail by reading <a href="https://docs.python.org/3.9/tutorial/introduction.html#lists">this page</a>.
1919

20+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5979).
21+
2022
Use list slicing to print `[4, 9, 16]`.
2123

2224
<div class='hint'>List slicing syntax looks just like that for strings: <code>lst[index1:index2]</code>.

Diff for: ‎Data structures/Lists operations/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ squares
3232

3333
Find out about many other useful list methods on <a href="https://docs.python.org/3/tutorial/datastructures.html#more-on-lists">this page</a>.
3434

35+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6031).
36+
3537
Replace `"dino"` with `"dinosaur"` in the `animals` list.
3638
<div class='hint'>Use list indexing operation and value assignment.</div>

Diff for: ‎Data structures/Nested Lists/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Output:
3131
```text
3232
1
3333
```
34+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6938).
35+
3436
In the code editor, use indexing to access and print elements `9` and `10` from of the nested list `my_list`.
3537

3638
<div class="hint">If you're stuck, review the examples in the task description again.</div>

Diff for: ‎Data structures/Tuples/task.md

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ values `12345`, `54321`, and `hello!` are packed together in a tuple.
4040

4141
Some other list methods are also
4242
applicable to tuples. You can read more about tuples <a href="https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences">here</a>.
43+
44+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7462).
4345

4446
Print the length of the tuple `alphabet`. Then create a tuple with a single element `'fun_tuple'`.
4547
You can run the code to see what it prints.

0 commit comments

Comments
 (0)
Please sign in to comment.