rapid-router 5.18.0__py2.py3-none-any.whl → 7.6.8__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. example_project/rapid_router_test_settings.py +19 -7
  2. example_project/settings.py +21 -8
  3. example_project/urls.py +5 -6
  4. game/__init__.py +1 -1
  5. game/admin.py +7 -2
  6. game/character.py +8 -0
  7. game/decor.py +40 -0
  8. game/end_to_end_tests/base_game_test.py +34 -27
  9. game/end_to_end_tests/editor_page.py +15 -0
  10. game/end_to_end_tests/game_page.py +88 -20
  11. game/end_to_end_tests/selenium_test_case.py +1 -20
  12. game/end_to_end_tests/test_cow_crashes.py +3 -5
  13. game/end_to_end_tests/test_level_editor.py +273 -10
  14. game/end_to_end_tests/test_level_selection.py +25 -3
  15. game/end_to_end_tests/test_play_through.py +222 -127
  16. game/end_to_end_tests/test_python_levels.py +41 -7
  17. game/end_to_end_tests/test_saving_workspace.py +2 -1
  18. game/forms.py +7 -1
  19. game/level_management.py +26 -11
  20. game/messages.py +899 -337
  21. game/migrations/0001_squashed_0025_levels_ordering_pt1.py +19 -1
  22. game/migrations/0026_levels_pt2.py +13 -2
  23. game/migrations/0032_cannot_turn_left_level.py +13 -2
  24. game/migrations/0033_recursion_level.py +13 -2
  25. game/migrations/0034_joes_level.py +13 -2
  26. game/migrations/0035_disable_route_score_level_70.py +0 -2
  27. game/migrations/0036_level_score_73.py +0 -2
  28. game/migrations/0037_level_score_79.py +0 -2
  29. game/migrations/0038_level_score_40.py +0 -1
  30. game/migrations/0042_level_score_73.py +0 -2
  31. game/migrations/0048_add_cow_field_and_blocks.py +0 -2
  32. game/migrations/0049_level_score_34.py +0 -2
  33. game/migrations/0050_level_score_40.py +0 -2
  34. game/migrations/0051_level_score_49.py +0 -1
  35. game/migrations/0086_loop_levels.py +13 -2
  36. game/migrations/0092_disable_algo_score_in_custom_levels.py +28 -0
  37. game/migrations/0093_alter_level_character_name.py +18 -0
  38. game/migrations/0094_add_hint_lesson_subtitle_to_levels.py +28 -0
  39. game/migrations/0095_level_commands.py +18 -0
  40. game/migrations/0096_alter_level_commands.py +18 -0
  41. game/migrations/0097_add_python_den_levels.py +1515 -0
  42. game/migrations/0098_add_episode_link_fields.py +44 -0
  43. game/migrations/0099_python_episodes_links.py +103 -0
  44. game/migrations/0100_reorder_python_levels.py +179 -0
  45. game/migrations/0101_rename_episodes.py +45 -0
  46. game/migrations/0102_reoder_episodes_13_14.py +136 -0
  47. game/migrations/0103_level_1015_solution.py +26 -0
  48. game/migrations/0104_remove_level_direct_drive.py +17 -0
  49. game/migrations/0105_delete_invalid_attempts.py +18 -0
  50. game/migrations/0106_fields_to_snake_case.py +48 -0
  51. game/migrations/0107_rename_worksheet_link_episode_student_worksheet_link.py +18 -0
  52. game/migrations/0108_episode_indy_worksheet_link.py +18 -0
  53. game/migrations/0109_create_episodes_23_and_24.py +99 -0
  54. game/migrations/0110_remove_episode_indy_worksheet_link_and_more.py +100 -0
  55. game/migrations/0111_create_worksheets.py +149 -0
  56. game/migrations/0112_worksheet_locked_classes.py +21 -0
  57. game/migrations/0113_level_needs_approval.py +18 -0
  58. game/migrations/0114_default_and_non_student_levels_no_approval.py +31 -0
  59. game/migrations/0115_level_level__default_does_not_need_approval.py +22 -0
  60. game/migrations/0116_update_worksheet_video_links.py +68 -0
  61. game/migrations/0117_update_solutions_to_if_else.py +61 -0
  62. game/models.py +127 -17
  63. game/permissions.py +51 -19
  64. game/python_den_urls.py +26 -0
  65. game/random_road.py +9 -9
  66. game/serializers.py +12 -17
  67. game/static/django_reverse_js/js/reverse.js +171 -0
  68. game/static/game/css/LilitaOne-Regular.ttf +0 -0
  69. game/static/game/css/backgrounds.css +8 -12
  70. game/static/game/css/dataTables.custom.css +3 -2
  71. game/static/game/css/editor.css +47 -0
  72. game/static/game/css/game.css +37 -43
  73. game/static/game/css/game_screen.css +16 -0
  74. game/static/game/css/level_editor.css +5 -0
  75. game/static/game/css/level_selection.css +17 -2
  76. game/static/game/image/Python_Den_hero_student.png +0 -0
  77. game/static/game/image/Python_levels_page.svg +1954 -0
  78. game/static/game/image/characters/front_view/Electric_van.svg +448 -0
  79. game/static/game/image/characters/top_view/Electric_van.svg +448 -0
  80. game/static/game/image/decor/city/solar_panel.svg +1200 -0
  81. game/static/game/image/decor/farm/solar_panel.svg +86 -0
  82. game/static/game/image/decor/grass/solar_panel.svg +86 -0
  83. game/static/game/image/decor/snow/solar_panel.svg +173 -0
  84. game/static/game/image/electric_van.svg +448 -0
  85. game/static/game/image/icons/description.svg +1 -0
  86. game/static/game/image/icons/hint.svg +1 -0
  87. game/static/game/image/icons/python.svg +1 -1
  88. game/static/game/image/pigeon.svg +684 -0
  89. game/static/game/image/python_den_header.svg +19 -0
  90. game/static/game/js/animation.js +65 -24
  91. game/static/game/js/blockly/msg/js/bg.js +52 -1
  92. game/static/game/js/blockly/msg/js/ca.js +52 -1
  93. game/static/game/js/blockly/msg/js/en-gb.js +2 -0
  94. game/static/game/js/blockly/msg/js/en.js +2 -0
  95. game/static/game/js/blockly/msg/js/es.js +52 -1
  96. game/static/game/js/blockly/msg/js/fr.js +2 -0
  97. game/static/game/js/blockly/msg/js/hi.js +2 -0
  98. game/static/game/js/blockly/msg/js/it.js +52 -1
  99. game/static/game/js/blockly/msg/js/pl.js +52 -1
  100. game/static/game/js/blockly/msg/js/pt-br.js +52 -1
  101. game/static/game/js/blockly/msg/js/ru.js +52 -1
  102. game/static/game/js/blockly/msg/js/ur.js +52 -1
  103. game/static/game/js/blocklyCustomBlocks.js +93 -52
  104. game/static/game/js/button.js +12 -0
  105. game/static/game/js/cow.js +11 -7
  106. game/static/game/js/drawing.js +68 -29
  107. game/static/game/js/editor.js +23 -0
  108. game/static/game/js/game.js +74 -110
  109. game/static/game/js/level_editor.js +646 -274
  110. game/static/game/js/level_moderation.js +33 -2
  111. game/static/game/js/level_selection.js +1 -1
  112. game/static/game/js/loadLanguages.js +2 -2
  113. game/static/game/js/model.js +32 -2
  114. game/static/game/js/pythonControl.js +14 -1
  115. game/static/game/js/scoreboard.js +0 -37
  116. game/static/game/js/scoreboardSharedLevels.js +48 -0
  117. game/static/game/js/skulpt/skulpt-stdlib.js +1 -1
  118. game/static/game/js/sound.js +52 -5
  119. game/static/game/raphael_image/characters/top_view/Electric_van.svg +448 -0
  120. game/static/game/raphael_image/decor/city/solar_panel.svg +1200 -0
  121. game/static/game/raphael_image/decor/farm/solar_panel.svg +86 -0
  122. game/static/game/raphael_image/decor/grass/solar_panel.svg +86 -0
  123. game/static/game/raphael_image/decor/snow/solar_panel.svg +173 -0
  124. game/static/game/raphael_image/pigeon.svg +685 -0
  125. game/static/game/sass/game.scss +2 -2
  126. game/static/game/sound/clown_horn.mp3 +0 -0
  127. game/static/game/sound/clown_horn.ogg +0 -0
  128. game/static/game/sound/electric_van_starting.mp3 +0 -0
  129. game/static/game/sound/electric_van_starting.ogg +0 -0
  130. game/static/game/sound/pigeon.mp3 +0 -0
  131. game/static/game/sound/pigeon.ogg +0 -0
  132. game/static/game/sound/sleigh_bells.mp3 +0 -0
  133. game/static/game/sound/sleigh_bells.ogg +0 -0
  134. game/static/game/sound/sleigh_crash.mp3 +0 -0
  135. game/static/game/sound/sleigh_crash.ogg +0 -0
  136. game/templates/game/base.html +34 -14
  137. game/templates/game/basenonav.html +11 -5
  138. game/templates/game/game.html +142 -38
  139. game/templates/game/level_editor.html +340 -236
  140. game/templates/game/level_moderation.html +19 -6
  141. game/templates/game/level_selection.html +18 -110
  142. game/templates/game/python_den_level_selection.html +291 -0
  143. game/templates/game/python_den_worksheet.html +101 -0
  144. game/templates/game/scoreboard.html +83 -64
  145. game/tests/test_level_editor.py +94 -26
  146. game/tests/test_level_selection.py +149 -46
  147. game/tests/test_python_den_worksheet.py +85 -0
  148. game/tests/test_scoreboard.py +34 -7
  149. game/tests/utils/level.py +32 -26
  150. game/theme.py +5 -5
  151. game/urls.py +199 -61
  152. game/views/language_code_conversions.py +86 -86
  153. game/views/level.py +155 -63
  154. game/views/level_editor.py +88 -55
  155. game/views/level_moderation.py +23 -0
  156. game/views/level_selection.py +116 -47
  157. game/views/level_solutions.py +491 -106
  158. game/views/scoreboard.py +76 -51
  159. game/views/worksheet.py +25 -0
  160. rapid_router-7.6.8.dist-info/METADATA +174 -0
  161. {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info}/RECORD +164 -104
  162. {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info}/WHEEL +1 -1
  163. example_project/manage.py +0 -10
  164. game/static/game/image/actions/go.svg +0 -18
  165. game/static/game/js/js-reverse.js +0 -14
  166. game/static/game/js/pqselect.min.js +0 -9
  167. game/static/game/js/widget-scroller.js +0 -906
  168. rapid_router-5.18.0.dist-info/METADATA +0 -17
  169. {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info/licenses}/LICENSE.md +0 -0
  170. {rapid_router-5.18.0.dist-info → rapid_router-7.6.8.dist-info}/top_level.txt +0 -0
game/messages.py CHANGED
@@ -1,24 +1,16 @@
1
1
  from builtins import str
2
2
 
3
3
 
4
- def youtube_link(url, border):
4
+ def video_link(url):
5
5
  return (
6
6
  "<div class='popup_video'>"
7
- "<iframe "
8
- + "src="
9
- + str(url)
10
- + "?rel=0"
11
- + "' frameborder='"
12
- + str(border)
13
- + "' allowfullscreen class='video'></iframe><br></div>"
7
+ "<video controls name='media'>"
8
+ "<source src=" + str(url) + "type='video/mp4'></video><br></div>"
14
9
  )
15
10
 
16
11
 
17
12
  def play_button_icon_url():
18
- return (
19
- '<img src="/static/game/image/actions/go.svg" alt="Play button" '
20
- 'style="width: 4%;">'
21
- )
13
+ return '<img src="/static/game/image/icons/play.svg" alt="Play icon">' "<b>Play</b>"
22
14
 
23
15
 
24
16
  def step_button_icon_url():
@@ -36,9 +28,7 @@ def if_else_icon_url():
36
28
 
37
29
 
38
30
  def if_else_example_url():
39
- return (
40
- '<img src="/static/game/image/if_else_example.png" alt="If Else example">'
41
- )
31
+ return '<img src="/static/game/image/if_else_example.png" alt="If Else example">'
42
32
 
43
33
 
44
34
  def not_shared_level():
@@ -90,6 +80,19 @@ def no_data_to_show_level_moderation():
90
80
  )
91
81
 
92
82
 
83
+ """ Strings used on the Python Den worksheet page. """
84
+
85
+
86
+ def no_permission_python_den_worksheet_title():
87
+ return "No permission"
88
+
89
+
90
+ def no_permission_python_den_worksheet_page():
91
+ return (
92
+ "This content is only available to logged in users. Please log in to access this page."
93
+ )
94
+
95
+
93
96
  """ String messages used as level tips in the game view. """
94
97
 
95
98
 
@@ -101,16 +104,7 @@ def build_description(title, message):
101
104
  return f"<b>{title}</b><br><br>{message}"
102
105
 
103
106
 
104
- def title_level_default():
105
- return " "
106
-
107
-
108
- def description_level_default():
109
- return "Can you find the shortest route?"
110
-
111
-
112
- def hint_level_default():
113
- return "Think back to earlier levels. What did you learn?"
107
+ # RAPID ROUTER
114
108
 
115
109
 
116
110
  def title_level1():
@@ -367,7 +361,7 @@ def description_level13():
367
361
  f"Often there is more than one way to get to the house. The route that needs "
368
362
  f"the fewest directions is usually best. <br> Help the van find the "
369
363
  f"shortest route to the house. <br> You can press the {play_button_icon_url()} "
370
- f"or <b>Play</b> buttons to start the van."
364
+ f"button to start the van."
371
365
  )
372
366
  return build_description(title_level13(), message)
373
367
 
@@ -491,7 +485,9 @@ def title_level19():
491
485
 
492
486
 
493
487
  def description_level19():
494
- message = youtube_link("https://www.youtube-nocookie.com/embed/vFGd0v3msRE", 0)
488
+ message = video_link(
489
+ "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FPucDWuRfzuTxeLI6IHRx%2FMahana%20explains%20repeat%20functions.mp4?alt=media&token=361c8495-dc7d-4e18-9a7f-4c07c3fd303d"
490
+ )
495
491
  message += (
496
492
  "<div class='popup_message'>"
497
493
  "Attach a block inside the <b>Repeat</b> block to make the van repeat "
@@ -700,7 +696,9 @@ def title_level29():
700
696
 
701
697
 
702
698
  def description_level29():
703
- message = youtube_link("https://www.youtube-nocookie.com/embed/EDwc80X_LQI", 0)
699
+ message = video_link(
700
+ "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FmUm2VB4N62Opk2CezOFR%2FAna%20discusses%20repeat%20until%20and%20repeat%20while%20functions.mp4?alt=media&token=1add73b1-9e21-4cdb-876d-31495012bb50"
701
+ )
704
702
  message += (
705
703
  "<div class='popup_message'>"
706
704
  "Drag a block inside a <b>Repeat until</b> block to make the van repeat an "
@@ -783,7 +781,9 @@ def title_level33():
783
781
 
784
782
 
785
783
  def description_level33():
786
- message = youtube_link("https://www.youtube-nocookie.com/embed/O0RXbJyYq8o", 0)
784
+ message = video_link(
785
+ "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2F8A63G0OQlNdxMpvLuK9j%2FChris%20and%20Matt%20introduce%20if%20statements.mp4?alt=media&token=6fc94e71-a8b1-43a4-aadd-63fcf3b5788c"
786
+ )
787
787
  message += (
788
788
  "<div class='popup_message'>"
789
789
  "Another way of telling the van what to do is to use the <b>If</b> block. "
@@ -808,15 +808,15 @@ def hint_level33():
808
808
 
809
809
 
810
810
  def title_level34():
811
- return "Multiple <b>if</b>s"
811
+ return "<b>If</b> and bends"
812
812
 
813
813
 
814
814
  def description_level34():
815
815
  message = (
816
816
  "It can be handy to use <b>If</b> to give your van choices, so you don't "
817
817
  "have to give the van new instructions at every step. <br> For "
818
- "example: Tell the van <b>If</b> the <b>road exists forwards do Move "
819
- "forwards,</b> but <b>If</b> the <b>road exists left do Turn left</b>. "
818
+ "example: Tell the van <b>If</b> the <b>road exists forwards</b> do <b>Move "
819
+ "forwards</b>, <b>Else</b> do <b>Turn left</b>. "
820
820
  "<br> The van will choose correctly from the <b>Move forwards</b> and "
821
821
  "<b>Turn left</b> instructions depending on the road. <br> Use an 'if "
822
822
  "statement' in a 'loop' to drive the van down this bendy road."
@@ -827,7 +827,7 @@ def description_level34():
827
827
  def hint_level34():
828
828
  return (
829
829
  "This route looks complicated, but you can solve it without counting blocks. "
830
- "You are going to use a <b>Repeat until</b> block again and <b>If</b> blocks "
830
+ "You are going to use a <b>Repeat until</b> block again and an <b>If</b> block "
831
831
  "to help the driver check the road ahead so they can decide which way to go. "
832
832
  "What are the possible directions on this route?"
833
833
  )
@@ -861,8 +861,7 @@ def title_level36():
861
861
 
862
862
 
863
863
  def description_level36():
864
- message = youtube_link("https://www.youtube-nocookie.com/embed/GUUJSRuAyU0", 0)
865
- message += (
864
+ message = (
866
865
  f"<div class='popup_message'>"
867
866
  f"You can change the <b>if</b> block to make more choices. Click on the"
868
867
  f" {if_else_icon_url()} to add <b>else if</b>."
@@ -878,9 +877,7 @@ def description_level36():
878
877
  f"This is a general algorithm, it can be used for lots of different routes!"
879
878
  f"</div>"
880
879
  )
881
- return build_description(
882
- title_level36(), f"<div class='main_popup_container'>{message}</div>"
883
- )
880
+ return build_description(title_level36(), message)
884
881
 
885
882
 
886
883
  def hint_level36():
@@ -1043,7 +1040,9 @@ def title_level44():
1043
1040
 
1044
1041
 
1045
1042
  def description_level44():
1046
- message = youtube_link("https://www.youtube-nocookie.com/embed/UFpsEjaB_DI", 0)
1043
+ message = video_link(
1044
+ "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FVDmgFe1LBpTpWI2b9EVN%2FWill%20discusses%20variables.mp4?alt=media&token=3fb3c5ca-f0d7-4f98-9274-5c4db8f64eac"
1045
+ )
1047
1046
  message += (
1048
1047
  "<div class='popup_message'>"
1049
1048
  "The light varies from red to green. <br>"
@@ -1716,6 +1715,7 @@ def hint_level79():
1716
1715
  )
1717
1716
 
1718
1717
 
1718
+ # Legacy RR levels, still referenced in some Python Den levels
1719
1719
  # --- Introduction to Python levels ---
1720
1720
 
1721
1721
  INTRO_HINT = (
@@ -1731,7 +1731,9 @@ def title_level80():
1731
1731
 
1732
1732
 
1733
1733
  def description_level80():
1734
- message = youtube_link("https://www.youtube-nocookie.com/embed/5atj2caRjyA", 0)
1734
+ message = video_link(
1735
+ "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FhwOkHWSHqONf5lm7vbc4%2FCode%20for%20Life_%20Python.mp4?alt=media&token=8b47268c-91ea-4315-80e8-05c40d84372c"
1736
+ )
1735
1737
  message += (
1736
1738
  "As you create your program using Blockly, see what it looks like in the Python "
1737
1739
  "programming language. Can you tell which Python statement matches which block?"
@@ -1947,7 +1949,7 @@ def hint_level91():
1947
1949
 
1948
1950
  PYTHON_HINT = (
1949
1951
  "<br /><br />Check our documentation site, to see "
1950
- "<a href='https://docs.codeforlife.education/rapid-router/python-commands' target='_blank'>the full list of commands</a>."
1952
+ "<a href='https://code-for-life.gitbook.io/rapid-router/rapid-router-python-commands' target='_blank'>the full list of commands</a>."
1951
1953
  "<br /><br />To learn more about Python in general, check this "
1952
1954
  "<a href='https://wiki.python.org/moin/BeginnersGuide' target='_blank'>Beginner's Guide to Python</a>."
1953
1955
  )
@@ -1966,6 +1968,15 @@ def description_level92():
1966
1968
  return build_description(title_level92(), message)
1967
1969
 
1968
1970
 
1971
+ def commands_level92():
1972
+ return (
1973
+ "<b>Movement</b>"
1974
+ + "<br>my_van.move_forwards()"
1975
+ + "<br>my_van.turn_left()"
1976
+ + "<br>my_van.turn_right()"
1977
+ )
1978
+
1979
+
1969
1980
  def hint_level92():
1970
1981
  return (
1971
1982
  "Try using the following commands:<br><pre>my_van.move_forwards()<br>my_van.turn_left()"
@@ -1985,6 +1996,15 @@ def description_level93():
1985
1996
  return build_description(title_level93(), message)
1986
1997
 
1987
1998
 
1999
+ def commands_level93():
2000
+ return (
2001
+ "<b>Movement</b>"
2002
+ + "<br>my_van.move_forwards()"
2003
+ + "<br>my_van.turn_left()"
2004
+ + "<br>my_van.turn_right()"
2005
+ )
2006
+
2007
+
1988
2008
  def hint_level93():
1989
2009
  return (
1990
2010
  """Try using the following commands:
@@ -2007,6 +2027,15 @@ def description_level94():
2007
2027
  return build_description(title_level94(), message)
2008
2028
 
2009
2029
 
2030
+ def commands_level94():
2031
+ return (
2032
+ "<b>Movement</b>"
2033
+ + "<br>my_van.move_forwards()"
2034
+ + "<br>my_van.turn_left()"
2035
+ + "<br>my_van.turn_right()"
2036
+ )
2037
+
2038
+
2010
2039
  def hint_level94():
2011
2040
  return (
2012
2041
  """Try using the following commands:
@@ -2029,6 +2058,15 @@ def description_level95():
2029
2058
  return build_description(title_level95(), message)
2030
2059
 
2031
2060
 
2061
+ def commands_level95():
2062
+ return (
2063
+ "<b>Movement</b>"
2064
+ + "<br>my_van.move_forwards()"
2065
+ + "<br>my_van.turn_left()"
2066
+ + "<br>my_van.turn_right()"
2067
+ )
2068
+
2069
+
2032
2070
  def hint_level95():
2033
2071
  return (
2034
2072
  """To repeat some statements a set number of times you can use something like the following:
@@ -2053,6 +2091,10 @@ def description_level96():
2053
2091
  return build_description(title_level96(), message)
2054
2092
 
2055
2093
 
2094
+ def commands_level96():
2095
+ return "<b>Movement</b>" + "<br>my_van.move_forwards()" + "<br>my_van.turn_left()"
2096
+
2097
+
2056
2098
  def hint_level96():
2057
2099
  return (
2058
2100
  """To repeat some statements a set number of times you can use something like the following:
@@ -2076,6 +2118,15 @@ def description_level97():
2076
2118
  return build_description(title_level97(), message)
2077
2119
 
2078
2120
 
2121
+ def commands_level97():
2122
+ return (
2123
+ "<b>Movement</b>"
2124
+ + "<br>my_van.move_forwards()"
2125
+ + "<br>my_van.turn_left()"
2126
+ + "<br>my_van.turn_right()"
2127
+ )
2128
+
2129
+
2079
2130
  def hint_level97():
2080
2131
  return (
2081
2132
  """To repeat within a repeats a set number of times you can use something like the following:
@@ -2102,6 +2153,21 @@ def description_level98():
2102
2153
  return build_description(title_level98(), message)
2103
2154
 
2104
2155
 
2156
+ def commands_level98():
2157
+ return (
2158
+ '<div class="row">'
2159
+ + '<div class="large-4 columns">'
2160
+ + "<b>Movement</b>"
2161
+ + "<br>my_van.move_forwards()"
2162
+ + "<br>my_van.turn_left()</div>"
2163
+ + '<div class="large-4 columns">'
2164
+ + "<b>Position</b>"
2165
+ + "<br>my_van.at_destination()"
2166
+ + "<br>my_van.is_road_forward()</div>"
2167
+ + '<div class="large-4 columns"></div></div>'
2168
+ )
2169
+
2170
+
2105
2171
  def hint_level98():
2106
2172
  return (
2107
2173
  """To repeat while a condition is met you can use something like the following:
@@ -2128,6 +2194,24 @@ def description_level99():
2128
2194
  return build_description(title_level99(), message)
2129
2195
 
2130
2196
 
2197
+ def commands_level99():
2198
+ return (
2199
+ '<div class="row">'
2200
+ + '<div class="large-4 columns">'
2201
+ + "<b>Movement</b>"
2202
+ + "<br>my_van.move_forwards()"
2203
+ + "<br>my_van.turn_left()"
2204
+ + "<br>my_van.turn_right()</div>"
2205
+ + '<div class="large-4 columns">'
2206
+ + "<b>Position</b>"
2207
+ + "<br>my_van.at_destination()"
2208
+ + "<br>my_van.is_road_right()"
2209
+ + "<br>my_van.is_road_left()"
2210
+ + "<br>my_van.is_road_forward()</div>"
2211
+ + '<div class="large-4 columns"></div></div>'
2212
+ )
2213
+
2214
+
2131
2215
  def hint_level99():
2132
2216
  return (
2133
2217
  """To repeat while a condition is met you can use something like the following:
@@ -2153,6 +2237,24 @@ def description_level100():
2153
2237
  return build_description(title_level100(), message)
2154
2238
 
2155
2239
 
2240
+ def commands_level100():
2241
+ return (
2242
+ '<div class="row">'
2243
+ + '<div class="large-4 columns">'
2244
+ + "<b>Movement</b>"
2245
+ + "<br>my_van.move_forwards()"
2246
+ + "<br>my_van.turn_left()"
2247
+ + "<br>my_van.turn_right()</div>"
2248
+ + '<div class="large-4 columns">'
2249
+ + "<b>Position</b>"
2250
+ + "<br>my_van.at_destination()"
2251
+ + "<br>my_van.is_road_forward()"
2252
+ + "<br>my_van.is_road_right()"
2253
+ + "<br>my_van.is_road_left()</div>"
2254
+ + '<div class="large-4 columns"></div></div>'
2255
+ )
2256
+
2257
+
2156
2258
  def hint_level100():
2157
2259
  return (
2158
2260
  "Try using<br><pre>if my_van.at_dead_end():</pre><br>to check if the van is at a dead end."
@@ -2173,6 +2275,15 @@ def description_level101():
2173
2275
  return build_description(title_level101(), message)
2174
2276
 
2175
2277
 
2278
+ def commands_level101():
2279
+ return (
2280
+ "<b>Movement</b>"
2281
+ + "<br>my_van.move_forwards()"
2282
+ + "<br>my_van.turn_left()"
2283
+ + "<br>my_van.turn_right()"
2284
+ )
2285
+
2286
+
2176
2287
  def hint_level101():
2177
2288
  return (
2178
2289
  """To define a function in Python you could do something like:
@@ -2197,6 +2308,15 @@ def description_level102():
2197
2308
  return build_description(title_level102(), message)
2198
2309
 
2199
2310
 
2311
+ def commands_level102():
2312
+ return (
2313
+ "<b>Movement</b>"
2314
+ + "<br>my_van.move_forwards()"
2315
+ + "<br>my_van.turn_left()"
2316
+ + "<br>my_van.turn_right()"
2317
+ )
2318
+
2319
+
2200
2320
  def hint_level102():
2201
2321
  return (
2202
2322
  """To define a function in Python you could do something like:
@@ -2220,6 +2340,15 @@ def description_level103():
2220
2340
  return build_description(title_level103(), message)
2221
2341
 
2222
2342
 
2343
+ def commands_level103():
2344
+ return (
2345
+ "<b>Movement</b>"
2346
+ + "<br>my_van.move_forwards()"
2347
+ + "<br>my_van.turn_left()"
2348
+ + "<br>my_van.turn_right()"
2349
+ )
2350
+
2351
+
2223
2352
  def hint_level103():
2224
2353
  return (
2225
2354
  """To define a function that calls another function you could do something like:
@@ -2247,6 +2376,15 @@ def description_level104():
2247
2376
  return build_description(title_level104(), message)
2248
2377
 
2249
2378
 
2379
+ def commands_level104():
2380
+ return (
2381
+ "<b>Movement</b>"
2382
+ + "<br>my_van.move_forwards()"
2383
+ + "<br>my_van.turn_left()"
2384
+ + "<br>my_van.turn_right()"
2385
+ )
2386
+
2387
+
2250
2388
  def hint_level104():
2251
2389
  return (
2252
2390
  """To define a function that calls another function you could do something like:
@@ -2274,6 +2412,25 @@ def description_level105():
2274
2412
  return build_description(title_level105(), message)
2275
2413
 
2276
2414
 
2415
+ def commands_level105():
2416
+ return (
2417
+ '<div class="row">'
2418
+ + '<div class="large-4 columns">'
2419
+ + "<b>Movement</b>"
2420
+ + "<br>my_van.move_forwards()"
2421
+ + "<br>my_van.turn_left()"
2422
+ + "<br>my_van.turn_right()"
2423
+ + "<br>my_van.wait()</div>"
2424
+ + '<div class="large-4 columns">'
2425
+ + "<b>Position</b>"
2426
+ + "<br>my_van.is_road_forward()"
2427
+ + "<br>my_van.is_road_left()"
2428
+ + "<br>my_van.at_red_traffic_light()"
2429
+ + "<br>my_van.at_destination()</div>"
2430
+ + '<div class="large-4 columns"></div></div>'
2431
+ )
2432
+
2433
+
2277
2434
  def hint_level105():
2278
2435
  return (
2279
2436
  "For this you will have to use a combination of the <b>while</b> and <b>if</b> statements."
@@ -2295,14 +2452,29 @@ def description_level106():
2295
2452
  return build_description(title_level106(), message)
2296
2453
 
2297
2454
 
2455
+ def commands_level106():
2456
+ return (
2457
+ '<div class="row">'
2458
+ + '<div class="large-4 columns">'
2459
+ + "<b>Movement</b>"
2460
+ + "<br>my_van.move_forwards()"
2461
+ + "<br>my_van.turn_right()</div>"
2462
+ + '<div class="large-4 columns">'
2463
+ + "<b>Position</b>"
2464
+ + "<br>my_van.at_destination()</div>"
2465
+ + '<div class="large-4 columns"></div></div>'
2466
+ )
2467
+
2468
+
2298
2469
  def hint_level106():
2299
2470
  return (
2300
2471
  """To use a variable to store the number of grid squares the van has to move you can do something like the following:
2301
- <pre>number = 1
2472
+ <pre>count = 1
2302
2473
  while not my_van.at_destination():
2303
- print number
2304
- number += 1</pre>
2305
- Variables can be used in place of constants when calling functions. For example to repeat something <strong>number</strong> times you can do something like the following:
2474
+ # Do something
2475
+ print(count)
2476
+ count = count + 1</pre>
2477
+ Variables can be used in place of fixed values when calling functions. For example to repeat something <strong>number</strong> times you can do something like the following:
2306
2478
  <pre>for count in range(number):</pre>"""
2307
2479
  + PYTHON_HINT
2308
2480
  )
@@ -2320,6 +2492,20 @@ def description_level107():
2320
2492
  return build_description(title_level107(), message)
2321
2493
 
2322
2494
 
2495
+ def commands_level107():
2496
+ return (
2497
+ '<div class="row">'
2498
+ + '<div class="large-4 columns">'
2499
+ + "<b>Movement</b>"
2500
+ + "<br>my_van.move_forwards()"
2501
+ + "<br>my_van.turn_left()</div>"
2502
+ + '<div class="large-4 columns">'
2503
+ + "<b>Position</b>"
2504
+ + "<br>my_van.at_destination()</div>"
2505
+ + '<div class="large-4 columns"></div></div>'
2506
+ )
2507
+
2508
+
2323
2509
  def hint_level107():
2324
2510
  return (
2325
2511
  "To double the value of a variable you can do something like the following:<br><pre>number *= 2</pre>"
@@ -2336,10 +2522,24 @@ def description_level108():
2336
2522
  return build_description(title_level108(), message)
2337
2523
 
2338
2524
 
2525
+ def commands_level108():
2526
+ return (
2527
+ '<div class="row">'
2528
+ + '<div class="large-4 columns">'
2529
+ + "<b>Movement</b>"
2530
+ + "<br>my_van.move_forwards()"
2531
+ + "<br>my_van.turn_left()</div>"
2532
+ + '<div class="large-4 columns">'
2533
+ + "<b>Position</b>"
2534
+ + "<br>my_van.at_destination()</div>"
2535
+ + '<div class="large-4 columns"></div></div>'
2536
+ )
2537
+
2538
+
2339
2539
  def hint_level108():
2340
2540
  return (
2341
2541
  "To decrease the value of a variable by an amount you can do something like the "
2342
- "following:<br><pre>number -= 5</pre>" + PYTHON_HINT
2542
+ "following:<br><pre>count = count - 5</pre>" + PYTHON_HINT
2343
2543
  )
2344
2544
 
2345
2545
 
@@ -2355,6 +2555,21 @@ def description_level109():
2355
2555
  return build_description(title_level109(), message)
2356
2556
 
2357
2557
 
2558
+ def commands_level109():
2559
+ return (
2560
+ '<div class="row">'
2561
+ + '<div class="large-4 columns">'
2562
+ + "<b>Movement</b>"
2563
+ + "<br>my_van.move_forwards()"
2564
+ + "<br>my_van.turn_right()"
2565
+ + "<br>my_van.turn_left()</div>"
2566
+ + '<div class="large-4 columns">'
2567
+ + "<b>Position</b>"
2568
+ + "<br>my_van.at_destination()</div>"
2569
+ + '<div class="large-4 columns"></div></div>'
2570
+ )
2571
+
2572
+
2358
2573
  def hint_level109():
2359
2574
  return (
2360
2575
  "To halve the value of a variable you can do something like the following:<br><pre>number /= 2</pre>"
@@ -2362,41 +2577,48 @@ def hint_level109():
2362
2577
  )
2363
2578
 
2364
2579
 
2580
+ # PYTHON DEN
2581
+
2582
+ # Worksheets starter code
2583
+
2584
+ def worksheet_starter_code():
2585
+ return "# Write your code below"
2586
+
2365
2587
  # Episode 12, Levels 110 - 122
2366
2588
  (
2367
- title_level110,
2368
- description_level110,
2369
- hint_level110,
2589
+ title_level1001,
2590
+ description_level1001,
2591
+ hint_level1001,
2370
2592
  ) = (
2371
2593
  lambda: "Here's Python",
2372
2594
  lambda: build_description(
2373
- title_level110(),
2595
+ title_level1001(),
2374
2596
  "As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?",
2375
2597
  ),
2376
2598
  lambda: "This is a deliberately simple level. What you need to focus on is the Python code that is being generated for the blocks you join.",
2377
2599
  )
2378
2600
 
2379
2601
  (
2380
- title_level111,
2381
- description_level111,
2382
- hint_level111,
2602
+ title_level1002,
2603
+ description_level1002,
2604
+ hint_level1002,
2383
2605
  ) = (
2384
2606
  lambda: "Matching Blockly",
2385
2607
  lambda: build_description(
2386
- title_level111(),
2608
+ title_level1002(),
2387
2609
  "As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?",
2388
2610
  ),
2389
2611
  lambda: "This is a deliberately simple level. What you need to focus on is the Python code that is being generated for the blocks you join.",
2390
2612
  )
2391
2613
 
2392
2614
  (
2393
- title_level112,
2394
- description_level112,
2395
- hint_level112,
2615
+ title_level1003,
2616
+ description_level1003,
2617
+ hint_level1003,
2396
2618
  ) = (
2397
2619
  lambda: "Don't forget to find the shortest route",
2398
2620
  lambda: build_description(
2399
- title_level112(),
2621
+ title_level1003(),
2400
2622
  "As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?"
2401
2623
  "<br><br>"
2402
2624
  "Don't forget to find the shortest route!",
@@ -2405,459 +2627,790 @@ def hint_level109():
2405
2627
  )
2406
2628
 
2407
2629
  (
2408
- title_level113,
2409
- description_level113,
2410
- hint_level113,
2630
+ title_level1004,
2631
+ description_level1004,
2632
+ hint_level1004,
2633
+ commands_level1004,
2411
2634
  ) = (
2412
2635
  lambda: "Where did the blocks go?",
2413
2636
  lambda: build_description(
2414
- title_level113(),
2637
+ title_level1004(),
2415
2638
  "Can you remember how the Python was formed under the blocks in the previous levels? Take a look in the Py Commands for a quick reminder.",
2416
2639
  ),
2417
2640
  lambda: "Now it is your turn, you can click on the Py commands button for a reminder of the Python commands that you can use.",
2641
+ lambda: "<b>Movement</b>"
2642
+ + "<br>my_van.move_forwards()"
2643
+ + "<br>my_van.turn_left()"
2644
+ + "<br>my_van.turn_right()",
2418
2645
  )
2419
2646
 
2420
2647
  (
2421
- title_level114,
2422
- description_level114,
2423
- hint_level114,
2648
+ title_level1005,
2649
+ description_level1005,
2650
+ hint_level1005,
2651
+ commands_level1005,
2424
2652
  ) = (
2425
2653
  lambda: "Tree snake",
2426
2654
  lambda: build_description(
2427
- title_level114(),
2655
+ title_level1005(),
2428
2656
  "This route is just a bit longer. Make sure you type the Python code accurately!",
2429
2657
  ),
2430
2658
  lambda: "The most common errors here are missing the round brackets at the end of the commands or mistyping the commands, e.g. use my_van.move_fowards() and not my_van.move_foward()",
2659
+ lambda: "<b>Movement</b>"
2660
+ + "<br>my_van.move_forwards()"
2661
+ + "<br>my_van.turn_left()"
2662
+ + "<br>my_van.turn_right()",
2431
2663
  )
2432
2664
 
2433
2665
  (
2434
- title_level115,
2435
- description_level115,
2436
- hint_level115,
2666
+ title_level1006,
2667
+ description_level1006,
2668
+ hint_level1006,
2669
+ commands_level1006,
2437
2670
  ) = (
2438
2671
  lambda: "Which way to turn? This way or that way?",
2439
2672
  lambda: build_description(
2440
- title_level115(),
2673
+ title_level1006(),
2441
2674
  "Try to find the shortest route using Python code only. You are getting really good at this!",
2442
2675
  ),
2443
2676
  lambda: "If you are stuck on this one, check that you are using the Python commands accurately. Click the Py Commands button to help you.",
2677
+ lambda: "<b>Movement</b>"
2678
+ + "<br>my_van.move_forwards()"
2679
+ + "<br>my_van.turn_left()"
2680
+ + "<br>my_van.turn_right()",
2444
2681
  )
2445
2682
 
2446
2683
  (
2447
- title_level116,
2448
- description_level116,
2449
- hint_level116,
2684
+ title_level1007,
2685
+ description_level1007,
2686
+ hint_level1007,
2450
2687
  ) = (
2451
2688
  lambda: "In a <b>while</b>, crocodile!",
2452
2689
  lambda: build_description(
2453
- title_level116(),
2454
- "This level may look easy, but this time you need to use a While Loop to deliver to the house."
2455
- "<br>"
2456
- "Can you do it? Name your variables wisely.",
2690
+ title_level1007(),
2691
+ "<div class='main_popup_container'>"
2692
+ "<div class='popup_message'>"
2693
+ "Try to build up the blocks using a while loop to solve this one. Make sure that you count carefully."
2694
+ "<br><br><br><br><br><br><br><br>Watch this video for more details: <br>"
2695
+ "</div>"
2696
+ f"{video_link("https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2F3ojsv3EPh8qREqYMJBqo%2FPython%20Den%20Variable%20blocks%20demo.mp4?alt=media&token=192e4448-f16b-497f-b0d3-18163fd7d1d7")}"
2697
+ "</div>",
2457
2698
  ),
2458
- lambda: "Make sure that you are using the right blocks here. You must use the pink block for variables and the dark blue number block for values. Watch the video if you are unsure.",
2699
+ lambda: "<div class='main_popup_container'>"
2700
+ "<div class='popup_message'>"
2701
+ "Make sure that you are using the right blocks here. You must use the pink block for variables and the dark blue number block for values."
2702
+ "<br><br><br><br><br><br><br><br>Watch the video here if you are unsure.<br>"
2703
+ "</div>"
2704
+ f"{video_link("https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2F3ojsv3EPh8qREqYMJBqo%2FPython%20Den%20Variable%20blocks%20demo.mp4?alt=media&token=192e4448-f16b-497f-b0d3-18163fd7d1d7")}"
2705
+ "</div>",
2459
2706
  )
2460
2707
 
2461
2708
  (
2462
- title_level117,
2463
- description_level117,
2464
- hint_level117,
2709
+ title_level1008,
2710
+ description_level1008,
2711
+ hint_level1008,
2465
2712
  ) = (
2466
2713
  lambda: "Wiggle <b>while</b> you work",
2467
2714
  lambda: build_description(
2468
- title_level117(),
2469
- "This time it's a little harder. We've added the directions back in."
2470
- "<br>"
2471
- "Can you put them in the right place?"
2472
- "<br><br>"
2473
- "Notice how the Python looks in the console.",
2715
+ title_level1008(),
2716
+ "Now look at the Python code for that while loop you created. Can you match the blocks to the Python? What do you notice about the Python code?",
2474
2717
  ),
2475
2718
  lambda: "If you cannot solve this one, try creating a solution without a while loop and then looking for what is repeated...",
2476
2719
  )
2477
2720
 
2478
2721
  (
2479
- title_level118,
2480
- description_level118,
2481
- hint_level118,
2722
+ title_level1009,
2723
+ description_level1009,
2724
+ hint_level1009,
2482
2725
  ) = (
2483
2726
  lambda: "This way, that way, forwards...",
2484
2727
  lambda: build_description(
2485
- title_level118(),
2486
- "Now all three directions are back!"
2487
- "<br>"
2488
- "Use what you have learned so far to get your delivery completed.",
2728
+ title_level1009(),
2729
+ "Think carefully about this one. It might be that some code is inside a loop and some code is not…",
2489
2730
  ),
2490
2731
  lambda: "You can solve this in stages. Try moving to the start of the repeated section, then adding the loop and then finishing it off.",
2491
2732
  )
2492
2733
 
2493
2734
  (
2494
- title_level119,
2495
- description_level119,
2496
- hint_level119,
2735
+ title_level1010,
2736
+ description_level1010,
2737
+ hint_level1010,
2738
+ commands_level1010,
2497
2739
  ) = (
2498
2740
  lambda: "Four leaf clover",
2499
2741
  lambda: build_description(
2500
- title_level119(),
2501
- "Now let's try what you've learned without blocks."
2502
- "<br>"
2503
- "Click on the Py Commands button to remind yourself of the syntax you need.",
2742
+ title_level1010(),
2743
+ "Look for a pattern and then count how many times it repeats. Good luck!",
2504
2744
  ),
2505
2745
  lambda: "If you cannot solve this one, try creating a solution without a while loop and then looking for what is repeated...",
2746
+ lambda: "<b>Movement</b>"
2747
+ + "<br>my_van.move_forwards()"
2748
+ + "<br>my_van.turn_left()"
2749
+ + "<br>my_van.turn_right()",
2506
2750
  )
2507
2751
 
2508
2752
  (
2509
- title_level120,
2510
- description_level120,
2511
- hint_level120,
2753
+ title_level1011,
2754
+ description_level1011,
2755
+ hint_level1011,
2756
+ commands_level1011,
2512
2757
  ) = (
2513
2758
  lambda: "Pond life",
2514
2759
  lambda: build_description(
2515
- title_level120(),
2516
- "So many routes but only one that is efficient. Can you work out which one it is?",
2760
+ title_level1011(),
2761
+ "There is a pattern of moves in this one too. Can you spot it?",
2517
2762
  ),
2518
2763
  lambda: "What if you go down the middle section?",
2764
+ lambda: "<b>Movement</b>"
2765
+ + "<br>my_van.move_forwards()"
2766
+ + "<br>my_van.turn_left()"
2767
+ + "<br>my_van.turn_right()",
2519
2768
  )
2520
2769
 
2521
2770
  (
2522
- title_level121,
2523
- description_level121,
2524
- hint_level121,
2771
+ title_level1012,
2772
+ description_level1012,
2773
+ hint_level1012,
2774
+ commands_level1012,
2525
2775
  ) = (
2526
2776
  lambda: "Farmyard overdrive",
2527
2777
  lambda: build_description(
2528
- title_level121(),
2529
- "Maybe including a loop is the answer here?",
2778
+ title_level1012(),
2779
+ "Look for a pattern before you type any code. You can solve this one with a counted loop…",
2530
2780
  ),
2531
2781
  lambda: "Try that middle route...",
2782
+ lambda: "<b>Movement</b>"
2783
+ + "<br>my_van.move_forwards()"
2784
+ + "<br>my_van.turn_left()"
2785
+ + "<br>my_van.turn_right()",
2532
2786
  )
2533
2787
 
2534
2788
  (
2535
- title_level122,
2536
- description_level122,
2537
- hint_level122,
2789
+ title_level1013,
2790
+ description_level1013,
2791
+ hint_level1013,
2792
+ commands_level1013,
2538
2793
  ) = (
2539
2794
  lambda: "Snnnaaaake reflection",
2540
2795
  lambda: build_description(
2541
- title_level122(),
2542
- "Can you see some patterns? Looks like those loops will come in handy again for this tricky route.",
2796
+ title_level1013(),
2797
+ "The solution to this one is just a bit longer. Build it up slowly. Good luck!",
2543
2798
  ),
2544
2799
  lambda: "Don't try to solve this in one go. Work out the pattern for the top route and check that works. Then move on to the next part...",
2800
+ lambda: "<b>Movement</b>"
2801
+ + "<br>my_van.move_forwards()"
2802
+ + "<br>my_van.turn_left()"
2803
+ + "<br>my_van.turn_right()",
2545
2804
  )
2546
2805
 
2547
-
2548
- # Episode 13, Levels 123 - 140
2549
2806
  (
2550
- title_level123,
2551
- description_level123,
2552
- hint_level123,
2807
+ title_level1014,
2808
+ description_level1014,
2809
+ hint_level1014,
2553
2810
  ) = (
2554
- lambda: "TODO",
2555
- lambda: build_description(title_level123(), "TODO"),
2556
- lambda: "TODO",
2811
+ lambda: "Too many cows",
2812
+ lambda: build_description(
2813
+ title_level1014(),
2814
+ "This is a nice long straight road, but there are cows about!",
2815
+ ),
2816
+ lambda: "Make sure you sound the horn to get the cows off the road.",
2557
2817
  )
2558
2818
 
2559
2819
  (
2560
- title_level124,
2561
- description_level124,
2562
- hint_level124,
2820
+ title_level1015,
2821
+ description_level1015,
2822
+ hint_level1015,
2563
2823
  ) = (
2564
- lambda: "TODO",
2565
- lambda: build_description(title_level124(), "TODO"),
2566
- lambda: "TODO",
2824
+ lambda: "Stepping it up",
2825
+ lambda: build_description(
2826
+ title_level1015(), "There are some bends in this road. Be careful!"
2827
+ ),
2828
+ lambda: "What do you need to count, how many times you move or how many times you move forwards?",
2567
2829
  )
2568
2830
 
2569
- (
2570
- title_level125,
2571
- description_level125,
2572
- hint_level125,
2573
- ) = (
2574
- lambda: "TODO",
2575
- lambda: build_description(title_level125(), "TODO"),
2576
- lambda: "TODO",
2831
+ (title_level1016, description_level1016, hint_level1016, commands_level1016) = (
2832
+ lambda: "Cows on the stairs",
2833
+ lambda: build_description(
2834
+ title_level1016(),
2835
+ "Oh no! The farmer seems to have let their cows out again. Be careful.",
2836
+ ),
2837
+ lambda: "Look for a pattern here...",
2838
+ lambda: '<div class="row">'
2839
+ + '<div class="large-4 columns">'
2840
+ + "<b>Movement</b>"
2841
+ + "<br>my_van.turn_left()"
2842
+ + "<br>my_van.turn_right()</div>"
2843
+ + "</div>"
2844
+ + '<div class="row">'
2845
+ + '<div class="large-4 columns">'
2846
+ + "<p><b>Animals</b>"
2847
+ + "<br>my_van.is_animal_crossing()"
2848
+ + "<br>my_van.sound_horn()</div>"
2849
+ + "</div>",
2577
2850
  )
2578
2851
 
2579
- (
2580
- title_level126,
2581
- description_level126,
2582
- hint_level126,
2583
- ) = (
2584
- lambda: "TODO",
2585
- lambda: build_description(title_level126(), "TODO"),
2586
- lambda: "TODO",
2852
+ (title_level1017, description_level1017, hint_level1017, commands_level1017) = (
2853
+ lambda: "Try stepping in Python!",
2854
+ lambda: build_description(
2855
+ title_level1017(),
2856
+ "Keep going, you're getting the hang of the Python code.",
2857
+ ),
2858
+ lambda: "So you are going forward unless...?",
2859
+ lambda: '<div class="row">'
2860
+ + '<div class="large-4 columns">'
2861
+ + "<b>Movement</b>"
2862
+ + "<br>my_van.move_forwards()"
2863
+ + "<br>my_van.turn_left()"
2864
+ + "<br>my_van.turn_right()</div>"
2865
+ + '<div class="large-4 columns">'
2866
+ + "<b>Position</b>"
2867
+ + "<br>my_van.is_road_left()</div>"
2868
+ + '<div class="large-4 columns"></div></div>',
2587
2869
  )
2588
2870
 
2589
- (
2590
- title_level127,
2591
- description_level127,
2592
- hint_level127,
2593
- ) = (
2594
- lambda: "TODO",
2595
- lambda: build_description(title_level127(), "TODO"),
2596
- lambda: "TODO",
2871
+ (title_level1018, description_level1018, hint_level1018, commands_level1018) = (
2872
+ lambda: "A long and winding road",
2873
+ lambda: build_description(title_level1018(), "Oh dear, you might get a bit dizzy!"),
2874
+ lambda: "What are you counting here, straight roads or bends?",
2875
+ lambda: '<div class="row">'
2876
+ + '<div class="large-4 columns">'
2877
+ + "<b>Movement</b>"
2878
+ + "<br>my_van.move_forwards()"
2879
+ + "<br>my_van.turn_left()</div>"
2880
+ + '<div class="large-4 columns">'
2881
+ + "<b>Position</b>"
2882
+ + "<br>my_van.is_road_left()</div>"
2883
+ + '<div class="large-4 columns"></div></div>',
2597
2884
  )
2598
2885
 
2599
2886
  (
2600
- title_level128,
2601
- description_level128,
2602
- hint_level128,
2887
+ title_level1019,
2888
+ description_level1019,
2889
+ hint_level1019,
2603
2890
  ) = (
2604
- lambda: "TODO",
2605
- lambda: build_description(title_level128(), "TODO"),
2606
- lambda: "TODO",
2891
+ lambda: "Try this level... or <b>else</b>!",
2892
+ lambda: build_description(
2893
+ title_level1019(),
2894
+ "Have you noticed that there are more roads ahead than turns? Try checking if there is a road ahead and then otherwise making the turns you need...",
2895
+ ),
2896
+ lambda: "Remember to use if..else",
2607
2897
  )
2608
2898
 
2609
- (
2610
- title_level129,
2611
- description_level129,
2612
- hint_level129,
2613
- ) = (
2614
- lambda: "TODO",
2615
- lambda: build_description(title_level129(), "TODO"),
2616
- lambda: "TODO",
2899
+ (title_level1020, description_level1020, hint_level1020, commands_level1020) = (
2900
+ lambda: "Now try one in Python!",
2901
+ lambda: build_description(
2902
+ title_level1020(), "Use if..else in Python for this level"
2903
+ ),
2904
+ lambda: "Don't get distracted by the other roads. Look for a pattern you can repeat.",
2905
+ lambda: '<div class="row">'
2906
+ + '<div class="large-4 columns">'
2907
+ + "<b>Movement</b>"
2908
+ + "<br>my_van.turn_left()"
2909
+ + "<br>my_van.turn_right()</div>"
2910
+ + '<div class="large-4 columns">'
2911
+ + "<b>Position</b>"
2912
+ + "<br>my_van.is_road_left()</div>"
2913
+ + '<div class="large-4 columns"></div></div>',
2617
2914
  )
2618
2915
 
2619
- (
2620
- title_level130,
2621
- description_level130,
2622
- hint_level130,
2623
- ) = (
2624
- lambda: "TODO",
2625
- lambda: build_description(title_level130(), "TODO"),
2626
- lambda: "TODO",
2916
+ (title_level1021, description_level1021, hint_level1021, commands_level1021) = (
2917
+ lambda: "What if there are multiple houses?",
2918
+ lambda: build_description(
2919
+ title_level1021(),
2920
+ "This is a really busy road. Make sure that you don't miss any of the houses.",
2921
+ ),
2922
+ lambda: "Did you get the last house? Think about what value the loop counter will have at that point in your code...",
2923
+ lambda: '<div class="row">'
2924
+ + '<div class="large-4 columns">'
2925
+ + "<b>Movement</b>"
2926
+ + "<br>my_van.move_forwards()"
2927
+ + "<br>my_van.turn_left()"
2928
+ + "<br>my_van.turn_right()"
2929
+ + "<br>my_van.deliver()</div>"
2930
+ + '<div class="large-4 columns">'
2931
+ + "<b>Position</b>"
2932
+ + "<br>my_van.is_road_left()</div>"
2933
+ + '<div class="large-4 columns"></div></div>',
2627
2934
  )
2628
2935
 
2629
2936
  (
2630
- title_level131,
2631
- description_level131,
2632
- hint_level131,
2937
+ title_level1022,
2938
+ description_level1022,
2939
+ hint_level1022,
2633
2940
  ) = (
2634
- lambda: "TODO",
2635
- lambda: build_description(title_level131(), "TODO"),
2636
- lambda: "TODO",
2941
+ lambda: "Count and check",
2942
+ lambda: build_description(
2943
+ title_level1022(), "There are lots of turns here, don't get distracted."
2944
+ ),
2945
+ lambda: "Think about the order of the questions you ask using your if and elif statements.",
2637
2946
  )
2638
2947
 
2639
2948
  (
2640
- title_level132,
2641
- description_level132,
2642
- hint_level132,
2949
+ title_level1023,
2950
+ description_level1023,
2951
+ hint_level1023,
2643
2952
  ) = (
2644
- lambda: "TODO",
2645
- lambda: build_description(title_level132(), "TODO"),
2646
- lambda: "TODO",
2953
+ lambda: "Another twisty trip",
2954
+ lambda: build_description(title_level1023(), "Don't go the long way around!"),
2955
+ lambda: "Think carefully about the order in which you ask questions in your if..else if block",
2647
2956
  )
2648
2957
 
2649
- (
2650
- title_level133,
2651
- description_level133,
2652
- hint_level133,
2653
- ) = (
2654
- lambda: "TODO",
2655
- lambda: build_description(title_level133(), "TODO"),
2656
- lambda: "TODO",
2958
+ (title_level1024, description_level1024, hint_level1024, commands_level1024) = (
2959
+ lambda: "Give Python a go!",
2960
+ lambda: build_description(
2961
+ title_level1024(), "Look carefully for the shortest route."
2962
+ ),
2963
+ lambda: "Think carefully about the order in which you ask questions in your if..elif statements.",
2964
+ lambda: '<div class="row">'
2965
+ + '<div class="large-4 columns">'
2966
+ + "<b>Movement</b>"
2967
+ + "<br>my_van.move_forwards()"
2968
+ + "<br>my_van.turn_left()"
2969
+ + "<br>my_van.turn_right()</div>"
2970
+ + '<div class="large-4 columns">'
2971
+ + "<b>Position</b>"
2972
+ + "<br>my_van.is_road_forward()"
2973
+ + "<br>my_van.is_road_left()</div>"
2974
+ + '<div class="large-4 columns"></div></div>',
2657
2975
  )
2658
2976
 
2659
- (
2660
- title_level134,
2661
- description_level134,
2662
- hint_level134,
2663
- ) = (
2664
- lambda: "TODO",
2665
- lambda: build_description(title_level134(), "TODO"),
2666
- lambda: "TODO",
2977
+ (title_level1025, description_level1025, hint_level1025, commands_level1025) = (
2978
+ lambda: "Now we've added a traffic light",
2979
+ lambda: build_description(
2980
+ title_level1025(), "Look carefully for the shortest route."
2981
+ ),
2982
+ lambda: "Think carefully about the order in which you ask questions in your if..elif statements. Don't forget the traffic lights.",
2983
+ lambda: '<div class="row">'
2984
+ + '<div class="large-4 columns">'
2985
+ + "<b>Movement</b>"
2986
+ + "<br>my_van.move_forwards()"
2987
+ + "<br>my_van.turn_left()"
2988
+ + "<br>my_van.turn_right()"
2989
+ + "<br>my_van.wait()</div>"
2990
+ + '<div class="large-4 columns">'
2991
+ + "<b>Position</b>"
2992
+ + "<br>my_van.is_road_forward()"
2993
+ + "<br>my_van.is_road_left()"
2994
+ + "<br>my_van.at_red_traffic_light()</div>"
2995
+ + '<div class="large-4 columns"></div></div>',
2667
2996
  )
2668
2997
 
2669
2998
  (
2670
- title_level135,
2671
- description_level135,
2672
- hint_level135,
2999
+ title_level1026,
3000
+ description_level1026,
3001
+ hint_level1026,
2673
3002
  ) = (
2674
- lambda: "TODO",
2675
- lambda: build_description(title_level135(), "TODO"),
2676
- lambda: "TODO",
3003
+ lambda: title_level85(),
3004
+ lambda: description_level85(),
3005
+ lambda: hint_level85(),
2677
3006
  )
2678
3007
 
2679
3008
  (
2680
- title_level136,
2681
- description_level136,
2682
- hint_level136,
3009
+ title_level1027,
3010
+ description_level1027,
3011
+ hint_level1027,
2683
3012
  ) = (
2684
- lambda: "TODO",
2685
- lambda: build_description(title_level136(), "TODO"),
2686
- lambda: "TODO",
3013
+ lambda: "Full steam ahead",
3014
+ lambda: build_description(
3015
+ title_level1027(), "Just keep going until you get there..."
3016
+ ),
3017
+ lambda: "You might find that the solution to this level is quite familiar...",
2687
3018
  )
2688
3019
 
2689
3020
  (
2690
- title_level137,
2691
- description_level137,
2692
- hint_level137,
3021
+ title_level1028,
3022
+ description_level1028,
3023
+ hint_level1028,
2693
3024
  ) = (
2694
- lambda: "TODO",
2695
- lambda: build_description(title_level137(), "TODO"),
2696
- lambda: "TODO",
3025
+ lambda: "Another staircase...",
3026
+ lambda: build_description(
3027
+ title_level1028(),
3028
+ "Well done, you did it! Now have a go at using the <b>Repeat while</b> block on a road with lots of turns.",
3029
+ ),
3030
+ lambda: "This is another route you have seen before. Last time you counted how many times your instructions were repeated. This time, your program is going to repeat your commands until you reach the destination. What do you need to repeat?",
2697
3031
  )
2698
3032
 
2699
3033
  (
2700
- title_level138,
2701
- description_level138,
2702
- hint_level138,
3034
+ title_level1029,
3035
+ description_level1029,
3036
+ hint_level1029,
2703
3037
  ) = (
2704
- lambda: "TODO",
2705
- lambda: build_description(title_level138(), "TODO"),
2706
- lambda: "TODO",
3038
+ lambda: title_level1010(),
3039
+ lambda: description_level1010(),
3040
+ lambda: hint_level1010(),
3041
+ )
3042
+
3043
+ (title_level1030, description_level1030, hint_level1030, commands_level1030) = (
3044
+ lambda: title_level84(),
3045
+ lambda: build_description(
3046
+ title_level1030(),
3047
+ "Well done, you did it! Now have a go at coding with Repeats in Python only.",
3048
+ ),
3049
+ lambda: hint_level84(),
3050
+ lambda: '<div class="row">'
3051
+ + '<div class="large-4 columns">'
3052
+ + "<b>Movement</b>"
3053
+ + "<br>my_van.turn_left()"
3054
+ + "<br>my_van.turn_right()</div>"
3055
+ + '<div class="large-4 columns">'
3056
+ + "<b>Position</b>"
3057
+ + "<br>my_van.at_destination()</div>"
3058
+ + '<div class="large-4 columns"></div></div>',
2707
3059
  )
2708
3060
 
2709
3061
  (
2710
- title_level139,
2711
- description_level139,
2712
- hint_level139,
3062
+ title_level1031,
3063
+ description_level1031,
3064
+ hint_level1031,
2713
3065
  ) = (
2714
- lambda: "TODO",
2715
- lambda: build_description(title_level139(), "TODO"),
2716
- lambda: "TODO",
3066
+ lambda: title_level34(),
3067
+ lambda: description_level34(),
3068
+ lambda: hint_level34(),
2717
3069
  )
2718
3070
 
2719
3071
  (
2720
- title_level140,
2721
- description_level140,
2722
- hint_level140,
3072
+ title_level1032,
3073
+ description_level1032,
3074
+ hint_level1032,
2723
3075
  ) = (
2724
- lambda: "TODO",
2725
- lambda: build_description(title_level140(), "TODO"),
2726
- lambda: "TODO",
3076
+ lambda: "Something isn't <b>right</b>",
3077
+ lambda: build_description(
3078
+ title_level1032(),
3079
+ "You don't have a right turn block here, so plan your route carefully.",
3080
+ ),
3081
+ lambda: "Think carefully about the order in which you ask questions in your if-statement here...",
2727
3082
  )
2728
3083
 
3084
+ (title_level1033, description_level1033, hint_level1033, commands_level1033) = (
3085
+ lambda: "Looking both ways",
3086
+ lambda: build_description(title_level1033(), "Can you find the shortest route?"),
3087
+ lambda: "In this level, you want to check for a left turn first. If there is no left turn, turn right. Keep in mind what that looks like in Python.",
3088
+ lambda: '<div class="row">'
3089
+ + '<div class="large-4 columns">'
3090
+ + "<b>Movement</b>"
3091
+ + "<br>my_van.turn_left()"
3092
+ + "<br>my_van.turn_right()</div>"
3093
+ + '<div class="large-4 columns">'
3094
+ + "<b>Position</b>"
3095
+ + "<br>my_van.is_road_left()"
3096
+ + "<br>my_van.at_destination()</div>"
3097
+ + '<div class="large-4 columns"></div></div>',
3098
+ )
2729
3099
 
2730
- # Episode 14, Levels 141 - 148
2731
- (
2732
- title_level141,
2733
- description_level141,
2734
- hint_level141,
2735
- ) = (
2736
- lambda: "TODO",
2737
- lambda: build_description(title_level141(), "TODO"),
2738
- lambda: "TODO",
3100
+ (title_level1034, description_level1034, hint_level1034, commands_level1034) = (
3101
+ lambda: "The pond is nice but out of the way",
3102
+ lambda: build_description(
3103
+ title_level1034(),
3104
+ "Can you find the shortest route? Don't take the scenic route.",
3105
+ ),
3106
+ lambda: "Just look for the simplest route to the house.",
3107
+ lambda: '<div class="row">'
3108
+ + '<div class="large-4 columns">'
3109
+ + "<b>Movement</b>"
3110
+ + "<br>my_van.move_forwards()"
3111
+ + "<br>my_van.turn_right()</div>"
3112
+ + '<div class="large-4 columns">'
3113
+ + "<b>Position</b>"
3114
+ + "<br>my_van.is_road_right()"
3115
+ + "<br>my_van.at_destination()</div>"
3116
+ + '<div class="large-4 columns"></div></div>',
2739
3117
  )
2740
3118
 
2741
3119
  (
2742
- title_level142,
2743
- description_level142,
2744
- hint_level142,
3120
+ title_level1035,
3121
+ description_level1035,
3122
+ hint_level1035,
2745
3123
  ) = (
2746
- lambda: "TODO",
2747
- lambda: build_description(title_level142(), "TODO"),
2748
- lambda: "TODO",
3124
+ lambda: title_level99(),
3125
+ lambda: build_description(
3126
+ title_level99(),
3127
+ "Now try using what you have just learnt to solve this level. You could also try using the if, elif and else statements.",
3128
+ ),
3129
+ lambda: hint_level99(),
2749
3130
  )
2750
3131
 
2751
3132
  (
2752
- title_level143,
2753
- description_level143,
2754
- hint_level143,
3133
+ title_level1036,
3134
+ description_level1036,
3135
+ hint_level1036,
2755
3136
  ) = (
2756
- lambda: "TODO",
2757
- lambda: build_description(title_level143(), "TODO"),
2758
- lambda: "TODO",
3137
+ lambda: title_level38(),
3138
+ lambda: description_level38(),
3139
+ lambda: hint_level38(),
2759
3140
  )
2760
3141
 
2761
- (
2762
- title_level144,
2763
- description_level144,
2764
- hint_level144,
2765
- ) = (
2766
- lambda: "TODO",
2767
- lambda: build_description(title_level144(), "TODO"),
2768
- lambda: "TODO",
3142
+ (title_level1037, description_level1037, hint_level1037, commands_level1037) = (
3143
+ lambda: title_level100(),
3144
+ lambda: build_description(
3145
+ title_level100(),
3146
+ "Practice your new Python skills on this road to get the van to the destination.",
3147
+ ),
3148
+ lambda: hint_level100(),
3149
+ lambda: commands_level100(),
2769
3150
  )
2770
3151
 
2771
- (
2772
- title_level145,
2773
- description_level145,
2774
- hint_level145,
2775
- ) = (
2776
- lambda: "TODO",
2777
- lambda: build_description(title_level145(), "TODO"),
2778
- lambda: "TODO",
3152
+ (title_level1038, description_level1038, hint_level1038, commands_level1038) = (
3153
+ lambda: title_level39(),
3154
+ lambda: description_level39(),
3155
+ lambda: hint_level39(),
3156
+ lambda: '<div class="row">'
3157
+ + '<div class="large-4 columns">'
3158
+ + "<b>Movement</b>"
3159
+ + "<br>my_van.move_forwards()"
3160
+ + "<br>my_van.turn_around()"
3161
+ + "<br>my_van.turn_right()</div>"
3162
+ + '<div class="large-4 columns">'
3163
+ + "<b>Position</b>"
3164
+ + "<br>my_van.at_destination()"
3165
+ + "<br>my_van.is_road_forward()"
3166
+ + "<br>my_van.at_dead_end()</div>"
3167
+ + '<div class="large-4 columns"></div></div>'
3168
+ + '<div class="row">'
3169
+ + '<div class="large-4 columns">'
3170
+ + "<p><b>Animals</b>"
3171
+ + "<br>my_van.is_animal_crossing()"
3172
+ + "<br>my_van.sound_horn()</div>"
3173
+ + "</div>",
2779
3174
  )
2780
3175
 
2781
- (
2782
- title_level146,
2783
- description_level146,
2784
- hint_level146,
2785
- ) = (
2786
- lambda: "TODO",
2787
- lambda: build_description(title_level146(), "TODO"),
2788
- lambda: "TODO",
3176
+ (title_level1039, description_level1039, hint_level1039, commands_level1039) = (
3177
+ lambda: title_level47(),
3178
+ lambda: build_description(
3179
+ title_level47(),
3180
+ "Put your knowledge to test. Create an algorithm to lead the van to the house. Don't forget to turn and avoid the cows.",
3181
+ ),
3182
+ lambda: hint_level47(),
3183
+ lambda: '<div class="row">'
3184
+ + '<div class="large-4 columns">'
3185
+ + "<b>Movement</b>"
3186
+ + "<br>my_van.move_forwards()"
3187
+ + "<br>my_van.turn_left()</div>"
3188
+ + '<div class="large-4 columns">'
3189
+ + "<b>Position</b>"
3190
+ + "<br>my_van.at_destination()"
3191
+ + "<br>my_van.is_road_forward()</div>"
3192
+ + '<div class="large-4 columns"></div></div>'
3193
+ + '<div class="row">'
3194
+ + '<div class="large-4 columns">'
3195
+ + "<p><b>Animals</b>"
3196
+ + "<br>my_van.is_animal_crossing()"
3197
+ + "<br>my_van.sound_horn()</div>"
3198
+ + "</div>",
2789
3199
  )
2790
3200
 
2791
- (
2792
- title_level147,
2793
- description_level147,
2794
- hint_level147,
2795
- ) = (
2796
- lambda: "TODO",
2797
- lambda: build_description(title_level147(), "TODO"),
2798
- lambda: "TODO",
3201
+ (title_level1040, description_level1040, hint_level1040, commands_level1040) = (
3202
+ lambda: title_level48(),
3203
+ lambda: description_level48(),
3204
+ lambda: hint_level48(),
3205
+ lambda: '<div class="row">'
3206
+ + '<div class="large-4 columns">'
3207
+ + "<b>Movement</b>"
3208
+ + "<br>my_van.move_forwards()"
3209
+ + "<br>my_van.turn_around()"
3210
+ + "<br>my_van.turn_left()"
3211
+ + "<br>my_van.turn_right()"
3212
+ + "<br>my_van.wait()"
3213
+ + "<br>my_van.deliver()</div>"
3214
+ + '<div class="large-4 columns">'
3215
+ + "<b>Position</b>"
3216
+ + "<br>my_van.at_red_traffic_light()"
3217
+ + "<br>my_van.at_destination()"
3218
+ + "<br>my_van.is_road_forward()"
3219
+ + "<br>my_van.is_road_left()"
3220
+ + "<br>my_van.is_road_right()"
3221
+ + "<br>my_van.at_dead_end()</div>"
3222
+ + '<div class="large-4 columns"></div></div>',
2799
3223
  )
2800
3224
 
2801
3225
  (
2802
- title_level148,
2803
- description_level148,
2804
- hint_level148,
3226
+ title_level1041,
3227
+ description_level1041,
3228
+ hint_level1041,
2805
3229
  ) = (
2806
- lambda: "TODO",
2807
- lambda: build_description(title_level148(), "TODO"),
2808
- lambda: "TODO",
3230
+ lambda: title_level83(),
3231
+ lambda: description_level83(),
3232
+ lambda: hint_level83(),
2809
3233
  )
2810
3234
 
3235
+ (title_level1042, description_level1042, hint_level1042, commands_level1042) = (
3236
+ lambda: title_level95(),
3237
+ lambda: build_description(
3238
+ title_level95(),
3239
+ "Now try to use a <b>repeat</b> loop to solve this level. Look back at level 41 to see what this could look like in Python.",
3240
+ ),
3241
+ lambda: hint_level95(),
3242
+ lambda: commands_level95(),
3243
+ )
2811
3244
 
2812
- # Episode 15, Levels 149 - 153
2813
- (
2814
- title_level149,
2815
- description_level149,
2816
- hint_level149,
2817
- ) = (
2818
- lambda: "TODO",
2819
- lambda: build_description(title_level149(), "TODO"),
2820
- lambda: "TODO",
3245
+ (title_level1043, description_level1043, hint_level1043, commands_level1043) = (
3246
+ lambda: title_level96(),
3247
+ lambda: build_description(
3248
+ title_level96(),
3249
+ "Now try to use a <b>repeat</b> loop to solve this level. Look back at level 41 to see what this could look like in Python. This time you could use 2 loops, 1 for each straight piece of road.",
3250
+ ),
3251
+ lambda: hint_level96(),
3252
+ lambda: commands_level96(),
2821
3253
  )
2822
3254
 
2823
3255
  (
2824
- title_level150,
2825
- description_level150,
2826
- hint_level150,
3256
+ title_level1044,
3257
+ description_level1044,
3258
+ hint_level1044,
2827
3259
  ) = (
2828
- lambda: "TODO",
2829
- lambda: build_description(title_level150(), "TODO"),
2830
- lambda: "TODO",
3260
+ lambda: title_level84(),
3261
+ lambda: description_level84(),
3262
+ lambda: hint_level84(),
2831
3263
  )
2832
3264
 
2833
- (
2834
- title_level151,
2835
- description_level151,
2836
- hint_level151,
2837
- ) = (
2838
- lambda: "TODO",
2839
- lambda: build_description(title_level151(), "TODO"),
2840
- lambda: "TODO",
3265
+ (title_level1045, description_level1045, hint_level1045, commands_level1045) = (
3266
+ lambda: title_level97(),
3267
+ lambda: build_description(
3268
+ title_level97(),
3269
+ "Now try to use a loop within a loop, known as a 'nested loop'. Look back at level 44 to see what this could look like in Python.",
3270
+ ),
3271
+ lambda: hint_level97(),
3272
+ lambda: commands_level97(),
3273
+ )
3274
+
3275
+ (title_level1046, description_level1046, hint_level1046, commands_level1046) = (
3276
+ lambda: title_level106(),
3277
+ lambda: description_level106(),
3278
+ lambda: hint_level106(),
3279
+ lambda: commands_level106(),
3280
+ )
3281
+
3282
+ (title_level1047, description_level1047, hint_level1047, commands_level1047) = (
3283
+ lambda: title_level107(),
3284
+ lambda: description_level107(),
3285
+ lambda: hint_level107(),
3286
+ lambda: commands_level107(),
3287
+ )
3288
+
3289
+ (title_level1048, description_level1048, hint_level1048, commands_level1048) = (
3290
+ lambda: title_level108(),
3291
+ lambda: description_level108(),
3292
+ lambda: hint_level108(),
3293
+ lambda: commands_level108(),
3294
+ )
3295
+
3296
+ (title_level1049, description_level1049, hint_level1049, commands_level1049) = (
3297
+ lambda: title_level109(),
3298
+ lambda: description_level109(),
3299
+ lambda: hint_level109(),
3300
+ lambda: commands_level109(),
2841
3301
  )
2842
3302
 
2843
3303
  (
2844
- title_level152,
2845
- description_level152,
2846
- hint_level152,
3304
+ title_level1050,
3305
+ description_level1050,
3306
+ hint_level1050,
2847
3307
  ) = (
2848
- lambda: "TODO",
2849
- lambda: build_description(title_level152(), "TODO"),
2850
- lambda: "TODO",
3308
+ lambda: title_level61(),
3309
+ lambda: description_level61(),
3310
+ lambda: hint_level61(),
2851
3311
  )
2852
3312
 
2853
3313
  (
2854
- title_level153,
2855
- description_level153,
2856
- hint_level153,
3314
+ title_level1051,
3315
+ description_level1051,
3316
+ hint_level1051,
2857
3317
  ) = (
2858
- lambda: "TODO",
2859
- lambda: build_description(title_level153(), "TODO"),
2860
- lambda: "TODO",
3318
+ lambda: title_level62(),
3319
+ lambda: description_level62(),
3320
+ lambda: hint_level62(),
3321
+ )
3322
+
3323
+ (title_level1052, description_level1052, hint_level1052, commands_level1052) = (
3324
+ lambda: title_level63(),
3325
+ lambda: description_level63(),
3326
+ lambda: hint_level63(),
3327
+ lambda: "<b>Movement</b>"
3328
+ + "<br>my_van.move_forwards()"
3329
+ + "<br>my_van.turn_left()"
3330
+ + "<br>my_van.turn_right()",
3331
+ )
3332
+
3333
+ (title_level1053, description_level1053, hint_level1053, commands_level1053) = (
3334
+ lambda: title_level64(),
3335
+ lambda: description_level64(),
3336
+ lambda: hint_level64(),
3337
+ lambda: "<b>Movement</b>"
3338
+ + "<br>my_van.move_forwards()"
3339
+ + "<br>my_van.turn_left()"
3340
+ + "<br>my_van.turn_right()",
3341
+ )
3342
+
3343
+ (title_level1054, description_level1054, hint_level1054, commands_level1054) = (
3344
+ lambda: title_level65(),
3345
+ lambda: description_level65(),
3346
+ lambda: hint_level65(),
3347
+ lambda: "<b>Movement</b>"
3348
+ + "<br>my_van.move_forwards()"
3349
+ + "<br>my_van.turn_left()"
3350
+ + "<br>my_van.turn_right()",
3351
+ )
3352
+
3353
+ (title_level1055, description_level1055, hint_level1055, commands_level1055) = (
3354
+ lambda: title_level66(),
3355
+ lambda: description_level66(),
3356
+ lambda: hint_level66(),
3357
+ lambda: "<b>Movement</b>"
3358
+ + "<br>my_van.move_forwards()"
3359
+ + "<br>my_van.turn_left()"
3360
+ + "<br>my_van.turn_right()",
3361
+ )
3362
+
3363
+ (title_level1056, description_level1056, hint_level1056, commands_level1056) = (
3364
+ lambda: title_level67(),
3365
+ lambda: description_level67(),
3366
+ lambda: hint_level67(),
3367
+ lambda: "<b>Movement</b>"
3368
+ + "<br>my_van.move_forwards()"
3369
+ + "<br>my_van.turn_left()"
3370
+ + "<br>my_van.turn_right()",
3371
+ )
3372
+
3373
+ (title_level1057, description_level1057, hint_level1057, commands_level1057) = (
3374
+ lambda: "Have a go at procedures",
3375
+ lambda: build_description(
3376
+ title_level1057(),
3377
+ "Try adding a procedure and watch what happens in Python.",
3378
+ ),
3379
+ lambda: hint_level90(),
3380
+ lambda: "<b>Movement</b>"
3381
+ + "<br>my_van.move_forwards()"
3382
+ + "<br>my_van.turn_left()"
3383
+ + "<br>my_van.turn_right()",
3384
+ )
3385
+
3386
+ (title_level1058, description_level1058, hint_level1058, commands_level1058) = (
3387
+ lambda: title_level91(),
3388
+ lambda: build_description(
3389
+ title_level1058(),
3390
+ "Try adding a procedure and watch what happens in Python.",
3391
+ ),
3392
+ lambda: hint_level91(),
3393
+ lambda: "<b>Movement</b>"
3394
+ + "<br>my_van.move_forwards()"
3395
+ + "<br>my_van.turn_left()"
3396
+ + "<br>my_van.turn_right()",
3397
+ )
3398
+
3399
+ (title_level1059, description_level1059, hint_level1059, commands_level1059) = (
3400
+ lambda: title_level101(),
3401
+ lambda: build_description(
3402
+ title_level101(),
3403
+ "Try defining your own procedure to solve this level. In Python procedures are generally called functions. Look back at the previous levels for examples of how to define a function in Python.",
3404
+ ),
3405
+ lambda: hint_level101(),
3406
+ lambda: commands_level101(),
3407
+ )
3408
+
3409
+ (title_level1060, description_level1060, hint_level1060, commands_level1060) = (
3410
+ lambda: title_level102(),
3411
+ lambda: description_level102(),
3412
+ lambda: hint_level102(),
3413
+ lambda: commands_level102(),
2861
3414
  )
2862
3415
 
2863
3416
 
@@ -2876,9 +3429,18 @@ def get_episode_title(episode_id):
2876
3429
  10: "Introduction to Python",
2877
3430
  11: "Python",
2878
3431
  12: "Counted Loops Using While",
2879
- 13: "Indeterminate While Loops - coming soon",
2880
- 14: "Selection in a Loop - coming soon",
2881
- 15: "For Loops - coming soon",
3432
+ 13: "Selection in a Loop",
3433
+ 14: "Indeterminate Loops",
3434
+ 15: "For Loops",
3435
+ 16: "Output, Operators, and Data",
3436
+ 17: "Variables, Input, and Casting",
3437
+ 18: "Selection",
3438
+ 19: "Complex Selection",
3439
+ 20: "String Manipulation",
3440
+ 21: "Lists",
3441
+ 22: "Procedures",
3442
+ 23: "2D Lists",
3443
+ 24: "Procedures and Functions",
2882
3444
  }
2883
3445
 
2884
3446
  return episode_titles[episode_id]