diff --git a/game/messages.py b/game/messages.py
index 99502e4f8..23c8708de 100644
--- a/game/messages.py
+++ b/game/messages.py
@@ -1858,6 +1858,16 @@ def hint_level79():
return message
+# --- Introduction to Python levels ---
+
+INTRO_HINT = (
+ "If you're stuck, you can learn more about the use of Blockly and Python on "
+ "our documentation site."
+ "
To learn more about Python in general, check this "
+ "Beginner's Guide to Python."
+)
+
+
def title_level80():
return ugettext("Here's Python! ")
@@ -1871,7 +1881,7 @@ def description_level80():
def hint_level80():
- return ""
+ return ugettext(INTRO_HINT)
def title_level81():
@@ -1887,7 +1897,7 @@ def description_level81():
def hint_level81():
- return ""
+ return ugettext(INTRO_HINT)
def title_level82():
@@ -1903,7 +1913,7 @@ def description_level82():
def hint_level82():
- return ""
+ return ugettext(INTRO_HINT)
def title_level83():
@@ -1919,7 +1929,7 @@ def description_level83():
def hint_level83():
- return ""
+ return ugettext(INTRO_HINT)
def title_level84():
@@ -1935,7 +1945,7 @@ def description_level84():
def hint_level84():
- return ""
+ return ugettext(INTRO_HINT)
def title_level85():
@@ -1952,7 +1962,7 @@ def description_level85():
def hint_level85():
- return ""
+ return ugettext(INTRO_HINT)
def title_level86():
@@ -1968,7 +1978,7 @@ def description_level86():
def hint_level86():
- return ""
+ return ugettext(INTRO_HINT)
def title_level87():
@@ -1985,7 +1995,7 @@ def description_level87():
def hint_level87():
- return ""
+ return ugettext(INTRO_HINT)
def title_level88():
@@ -2002,7 +2012,7 @@ def description_level88():
def hint_level88():
- return ""
+ return ugettext(INTRO_HINT)
def title_level89():
@@ -2019,7 +2029,7 @@ def description_level89():
def hint_level89():
- return ""
+ return ugettext(INTRO_HINT)
def title_level90():
@@ -2036,7 +2046,8 @@ def description_level90():
def hint_level90():
message = ugettext(
- "Don't forget to name your procedure and see what happens in Python."
+ "Don't forget to name your procedure and see what happens in Python. "
+ + INTRO_HINT
)
return message
@@ -2055,11 +2066,22 @@ def description_level91():
def hint_level91():
message = ugettext(
- "Don't forget to name your procedure and see what happens in Python."
+ "Don't forget to name your procedure and see what happens in Python. "
+ + INTRO_HINT
)
return message
+# --- Start of Python levels ---
+
+PYTHON_HINT = (
+ "
Check our documentation site, to see "
+ "the full list of commands."
+ "
To learn more about Python in general, check this "
+ "Beginner's Guide to Python."
+)
+
+
def title_level92():
return ugettext(
"Start with the basics, forward, left and right "
@@ -2079,6 +2101,7 @@ def hint_level92():
message = ugettext(
"Try using the following commands:
v.move_forwards()" + + PYTHON_HINT ) return message @@ -2101,8 +2124,9 @@ def hint_level93():
v.turn_left()" + "
v.turn_right()
v.move_forwards() v.turn_left() v.turn_right()""" + + PYTHON_HINT ) - return message.replace("\n", "
v.move_forwards() v.turn_left() v.turn_right()""" + + PYTHON_HINT ) - return message.replace("\n", "
if v.is_road_forward(): v.move_forwards()You may also need to use the else statement.""" + + PYTHON_HINT ) - return message.replace("\n", "
if v.is_road_forward(): v.move_forwards()You may also need to use the elif and else statements.""" + + PYTHON_HINT ) - return message.replace("\n", "
if v.at_dead_end():
my_function()Remember, you must define a function before you call it.""" + + PYTHON_HINT ) - return message.replace("\n", "
my_function()""" + + PYTHON_HINT ) - return message.replace("\n", "
for count in range(n):""" + + PYTHON_HINT ) - return message.replace("\n", "
n *= 2" + + PYTHON_HINT ) return message @@ -2452,6 +2490,7 @@ def hint_level108(): message = ugettext( "To decrease the value of a variable by an amount you can do something like the " + "following:
n -= 5" + + PYTHON_HINT ) return message @@ -2471,6 +2510,7 @@ def description_level109(): def hint_level109(): message = ugettext( "To halve the value of a variable you can do something like the following:
n /= 2" + + PYTHON_HINT ) return message