diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b80bec13..19dc725e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ +## v5.16.20 (2024-03-13) + +### Fix + +* Change n to number in levels 106-109 ([#1595](https://github.com/ocadotechnology/rapid-router/issues/1595)) ([`1561bbe`](https://github.com/ocadotechnology/rapid-router/commit/1561bbe57f31a2061049bea504df383e76dfe736)) + ## v5.16.19 (2024-03-01) ### Fix diff --git a/game/__init__.py b/game/__init__.py index 69b5a929d..838255b2b 100644 --- a/game/__init__.py +++ b/game/__init__.py @@ -1 +1 @@ -__version__ = "5.16.19" +__version__ = "5.16.20" 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