Skip to content

Commit 93d2685

Browse files
committed
Merge branch 'master' into french-dicts
2 parents 71df2bb + 2d4d933 commit 93d2685

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

core/chapters/c12_dictionaries.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ class dict_access4(french_must_be_dict):
132132

133133

134134
class UsingDictionaries(Page):
135+
title = "Using Dictionaries in Practice"
136+
135137
class shopping_cart1(ExerciseStep):
136138
"""
137139
Let's see dictionaries in a real life problem. Imagine you're building an online shopping website.
@@ -394,6 +396,8 @@ def substitute(string, d):
394396

395397

396398
class DictionaryKeysAndValues(Page):
399+
title = "Iterating over Dictionary Keys"
400+
397401
class introducing_keys(Step):
398402
"""
399403
Copy this code into the editor:

tests/golden_files/en/test_transcript.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7287,7 +7287,7 @@
72877287
" result += price",
72887288
" return result"
72897289
],
7290-
"page": "Using Dictionaries",
7290+
"page": "Using Dictionaries in Practice",
72917291
"program": [
72927292
"def total_cost(cart, prices):",
72937293
" result = 0",
@@ -7313,7 +7313,7 @@
73137313
" result += price * quantity",
73147314
" return result"
73157315
],
7316-
"page": "Using Dictionaries",
7316+
"page": "Using Dictionaries in Practice",
73177317
"program": [
73187318
"def total_cost(cart, quantities, prices):",
73197319
" result = 0",
@@ -7331,7 +7331,7 @@
73317331
"step": "shopping_cart4"
73327332
},
73337333
{
7334-
"page": "Using Dictionaries",
7334+
"page": "Using Dictionaries in Practice",
73357335
"program": [
73367336
"def substitute(string):",
73377337
" result = ''",
@@ -7371,7 +7371,7 @@
73717371
" result += d[letter]",
73727372
" return result"
73737373
],
7374-
"page": "Using Dictionaries",
7374+
"page": "Using Dictionaries in Practice",
73757375
"program": [
73767376
"def substitute(string, d):",
73777377
" result = \"\"",
@@ -7387,7 +7387,7 @@
73877387
"step": "dna_part2"
73887388
},
73897389
{
7390-
"page": "Dictionary Keys And Values",
7390+
"page": "Iterating over Dictionary Keys",
73917391
"program": [
73927392
"quantities = {'apple': 1, 'cat': 10}",
73937393
"print(quantities.keys())"
@@ -7405,7 +7405,7 @@
74057405
"step": "introducing_keys"
74067406
},
74077407
{
7408-
"page": "Dictionary Keys And Values",
7408+
"page": "Iterating over Dictionary Keys",
74097409
"program": [
74107410
"quantities = {'apple': 1, 'cat': 10}",
74117411
"for key in quantities.keys():",
@@ -7424,7 +7424,7 @@
74247424
"step": "keys_are_iterable"
74257425
},
74267426
{
7427-
"page": "Dictionary Keys And Values",
7427+
"page": "Iterating over Dictionary Keys",
74287428
"program": [
74297429
"quantities = {'apple': 1, 'cat': 10}",
74307430
"for key in quantities:",
@@ -7452,7 +7452,7 @@
74527452
" result += price * quantity",
74537453
" return result"
74547454
],
7455-
"page": "Dictionary Keys And Values",
7455+
"page": "Iterating over Dictionary Keys",
74567456
"program": [
74577457
"def total_cost(quantities, prices):",
74587458
" result = 0",
@@ -7477,7 +7477,7 @@
74777477
" print(\"French: \" + french[word])",
74787478
" print(\"---\")"
74797479
],
7480-
"page": "Dictionary Keys And Values",
7480+
"page": "Iterating over Dictionary Keys",
74817481
"program": [
74827482
"def print_words(french):",
74837483
" for word in french:",
@@ -7501,7 +7501,7 @@
75017501
" print(\"German: \" + german[word])",
75027502
" print(\"---\")"
75037503
],
7504-
"page": "Dictionary Keys And Values",
7504+
"page": "Iterating over Dictionary Keys",
75057505
"program": [
75067506
"def print_words(french, german):",
75077507
" for word in french:",
@@ -7518,7 +7518,7 @@
75187518
"step": "english_to_german"
75197519
},
75207520
{
7521-
"page": "Dictionary Keys And Values",
7521+
"page": "Iterating over Dictionary Keys",
75227522
"program": [
75237523
"def print_words(words):",
75247524
" for word in words:",

translations/english.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21880,7 +21880,7 @@ msgstr ""
2188021880

2188121881
#. https://futurecoder.io/course/#DictionaryKeysAndValues
2188221882
msgid "pages.DictionaryKeysAndValues.title"
21883-
msgstr "Dictionary Keys And Values"
21883+
msgstr "Iterating over Dictionary Keys"
2188421884

2188521885
#. https://futurecoder.io/course/#EqualsVsIs
2188621886
#.
@@ -30898,7 +30898,7 @@ msgstr ""
3089830898

3089930899
#. https://futurecoder.io/course/#UsingDictionaries
3090030900
msgid "pages.UsingDictionaries.title"
30901-
msgstr "Using Dictionaries"
30901+
msgstr "Using Dictionaries in Practice"
3090230902

3090330903
#. https://futurecoder.io/course/#UsingVariables
3090430904
msgid "pages.UsingVariables.steps.final_text.text"
16 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)