Skip to content

Commit 28004e2

Browse files
authored
Merge pull request #335 from NPalopoli/patch-5
guide.md: update Q&A in "Dictionaries Challenges" section
2 parents b26d5c8 + e098065 commit 28004e2

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

_extras/guide.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,19 @@ installation. Otherwise, it will tell you that the system is good to go and read
4040
`tuple`
4141

4242
### Dictionaries Challenges
43-
* Can you do reassignment in a dictionary? Give it a try.
4443

45-
Make sure it is also clear that access to 'the second value' is actually just about the key name. Add for example `rev[10] = "ten"` to clarify it is not about the position.
44+
* Changing dictionaries: 2. Reassign the value that corresponds to the key `2`.
4645

47-
* You should see the following output:
48-
`{1: 'one', 2: 'two', 3: 'three'}`
46+
Make sure it is also clear that access to 'the value that corresponds to the key `2`' is actually just about the key name. Add for example `rev[10] = "ten"` to clarify it is not about the position.
47+
48+
~~~
49+
rev
50+
~~~
51+
{: .language-python}
52+
~~~
53+
{1: 'one', 2: 'two', 3: 'three'}
54+
~~~
55+
{: .output}
4956

5057
~~~
5158
rev[2] = "apple-sauce"
@@ -55,7 +62,7 @@ rev[2] = "apple-sauce"
5562
~~~
5663
{1: 'one', 2: 'apple-sauce', 3: 'three'}
5764
~~~
58-
{: .language-python}
65+
{: .output}
5966

6067
## 02-starting-with-data
6168

0 commit comments

Comments
 (0)