diff --git a/game/messages.py b/game/messages.py index 2ff4e962d..01bdef81d 100644 --- a/game/messages.py +++ b/game/messages.py @@ -2309,12 +2309,12 @@ def description_level106(): def hint_level106(): return ( """To use a variable to store the number of grid squares the van has to move you can do something like the following: -
n = 1
+
number = 1
 while not my_van.at_destination():
-    print n
-    n += 1
-Variables can be used in place of constants when calling functions. For example to repeat something n times you can do something like the following: -
for count in range(n):
""" + print number + number += 1
+Variables can be used in place of constants when calling functions. For example to repeat something number times you can do something like the following: +
for count in range(number):
""" + PYTHON_HINT ) @@ -2333,7 +2333,7 @@ def description_level107(): def hint_level107(): return ( - "To double the value of a variable you can do something like the following:
n *= 2
" + "To double the value of a variable you can do something like the following:
number *= 2
" + PYTHON_HINT ) @@ -2350,7 +2350,7 @@ def description_level108(): def hint_level108(): return ( "To decrease the value of a variable by an amount you can do something like the " - "following:
n -= 5
" + PYTHON_HINT + "following:
number -= 5
" + PYTHON_HINT ) @@ -2368,7 +2368,7 @@ def description_level109(): def hint_level109(): return ( - "To halve the value of a variable you can do something like the following:
n /= 2
" + "To halve the value of a variable you can do something like the following:
number /= 2
" + PYTHON_HINT ) diff --git a/game/views/level_solutions.py b/game/views/level_solutions.py index 7fa9aeef9..efff08ea1 100644 --- a/game/views/level_solutions.py +++ b/game/views/level_solutions.py @@ -241,55 +241,55 @@ def big(): my_van = Van() -n = 1 +number = 1 while not my_van.at_destination(): my_van.turn_right() - for count in range(n): + for count in range(number): my_van.move_forwards() - n = n + 1""" + number = number + 1""" lvl_107 = """from van import Van my_van = Van() -n = 1 +number = 1 while not my_van.at_destination(): my_van.turn_left() - for count in range(n): + for count in range(number): my_van.move_forwards() - n = n * 2""" + number = number * 2""" lvl_108 = """from van import Van my_van = Van() -n = 6 +number = 6 while not my_van.at_destination(): - for i in range(n): + for i in range(number): my_van.move_forwards() my_van.turn_left() - n = n - 2""" + number = number - 2""" lvl_109 = """from van import Van my_van = Van() -n = 0 +number = 0 for count in range(4): my_van.turn_right() - for forward in range(n): + for forward in range(number): my_van.move_forwards() - n = n + 1 + number = number + 1 my_van.turn_right() while not my_van.at_destination(): - for count in range(n): + for count in range(number): my_van.move_forwards() my_van.turn_left() - n = n / 2""" + number = number / 2""" lvl_113 = """from van import Van