diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8b1faf9c60304ca8a9b6.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8b1faf9c60304ca8a9b6.md index 0a6e4c3f360..e593598abe9 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8b1faf9c60304ca8a9b6.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8b1faf9c60304ca8a9b6.md @@ -24,7 +24,7 @@ You should have a variable named `rods`. Your `rods` variable should be an empty dictionary. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` rods = __locals.get("rods") rods == {} `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8ea01436383a88256d7f.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8ea01436383a88256d7f.md index 2475f1a5069..d41145c8c00 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8ea01436383a88256d7f.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8ea01436383a88256d7f.md @@ -18,7 +18,7 @@ The syntax is `range(x, y, h)`, where `x` is the starting integer (inclusive), ` You should use the `range()` function to assign a sequence of numbers to `rods['A']`. The syntax for calling the `range()` function is `range(x, y, h)`. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` a = __locals.get('rods') type(a['A']) is range `)) @@ -28,7 +28,7 @@ You should use the `range()` function to assign a sequence of numbers to `rods[' You should use the `range()` function to assign the sequence of numbers from `3` to `1` to `rods['A']`. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` a = __locals.get('rods') a['A'] == range(3, 0, -1) `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc90949ff85e3b37be40d0.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc90949ff85e3b37be40d0.md index 67468ce118b..39828c89e7b 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc90949ff85e3b37be40d0.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc90949ff85e3b37be40d0.md @@ -16,7 +16,7 @@ Pass your `range()` call to the `list()` function to do that. You should pass your `range()` call to the `list()` function. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` a = __locals.get('rods') a['A'] == list(range(3, 0, -1)) `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc916138dbe03bdfe6cec6.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc916138dbe03bdfe6cec6.md index 5fe2565b412..fed68957a36 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc916138dbe03bdfe6cec6.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc916138dbe03bdfe6cec6.md @@ -21,7 +21,7 @@ You should declare an empty function named `move`. Remember to use the `pass` ke ```js ({ test: () => { - assert(__pyodide.runPython(` + assert(runPython(` import inspect inspect.isfunction(__locals.get('move')) `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc92a9718fb53ca3d1bad7.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc92a9718fb53ca3d1bad7.md index 2cab8031321..57451f1fbac 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc92a9718fb53ca3d1bad7.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc92a9718fb53ca3d1bad7.md @@ -23,7 +23,7 @@ The value of `number_of_moves` should be the expression to calculate the number ```js ({ test: () => { - assert(__pyodide.runPython(` + assert(runPython(` a = __locals.get('NUMBER_OF_DISKS') __locals.get('number_of_moves') == 2**a -1 `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dce5f6ff907c2b2c47bb05.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dce5f6ff907c2b2c47bb05.md index 3c9ecac89e3..2aadcfeb998 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dce5f6ff907c2b2c47bb05.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dce5f6ff907c2b2c47bb05.md @@ -39,7 +39,7 @@ ${tCode.slice(ifLoc + ifLen)} __counter `; - const out = __pyodide.runPython(newCode); + const out = runPython(newCode); assert.equal(out, 3); } }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd280d69fa818ca782d50.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd280d69fa818ca782d50.md index 49989e6652b..8771518bbeb 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd280d69fa818ca782d50.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd280d69fa818ca782d50.md @@ -15,7 +15,7 @@ Instead of repeating the same code you wrote during the previous few steps and c You should declare an empty function named `make_allowed_move`. Remember to use the `pass` keyword inside the function body with the correct indentation. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` import inspect inspect.isfunction(__locals.get('make_allowed_move')) `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd4fbb4b598199acf5ec5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd4fbb4b598199acf5ec5.md index 246bce0fde8..cab4aa5793c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd4fbb4b598199acf5ec5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64ddd4fbb4b598199acf5ec5.md @@ -14,7 +14,7 @@ Add two parameters called `rod1` and `rod2` to your new function. Your `make_allowed_move()` function should have two parameters named `rod1` and `rod2`. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` import inspect str(inspect.signature(__locals.get('make_allowed_move'))) == '(rod1, rod2)' `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de1469fccce61940f498c4.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de1469fccce61940f498c4.md index e63a8498956..e884811d858 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de1469fccce61940f498c4.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de1469fccce61940f498c4.md @@ -14,14 +14,14 @@ The `rods` dictionary will represent the three rods with their disks. Give it th Your `rods` dictionary should have an `'A'` key. ```js -({ test: () => assert(__pyodide.runPython(`'A' in __locals.get("rods")`)) }) +({ test: () => assert(runPython(`'A' in __locals.get("rods")`)) }) ``` `rods['A']` should be an empty list. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` a = __locals.get("rods") a['A'] == [] `)) @@ -31,14 +31,14 @@ Your `rods` dictionary should have an `'A'` key. Your `rods` dictionary should have a `'B'` key. ```js -({ test: () => assert(__pyodide.runPython(`'B' in __locals.get("rods")`)) }) +({ test: () => assert(runPython(`'B' in __locals.get("rods")`)) }) ``` `rods['B']` should be an empty list. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` a = __locals.get("rods") a['B'] == [] `)) @@ -48,14 +48,14 @@ Your `rods` dictionary should have a `'B'` key. Your `rods` dictionary should have a `'C'` key. ```js -({ test: () => assert(__pyodide.runPython(`'C' in __locals.get("rods")`)) }) +({ test: () => assert(runPython(`'C' in __locals.get("rods")`)) }) ``` `rods['C']` should be an empty list. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` a = __locals.get("rods") a['C'] == [] `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de4bccf5becb208a48ca97.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de4bccf5becb208a48ca97.md index b2bd5178061..a28ac44f33f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de4bccf5becb208a48ca97.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de4bccf5becb208a48ca97.md @@ -20,7 +20,7 @@ Currently, the `move()` function does not take any parameters. Change the functi Your `move()` function should have `n`, `source`, `auxiliary`, and `target` as the parameters. The order matters. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` import inspect str(inspect.signature(__locals.get('move'))) == '(n, source, auxiliary, target)' `)) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/657b6a4a49faec5c600287ba.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/657b6a4a49faec5c600287ba.md index fa84c79b7ad..d942785697c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/657b6a4a49faec5c600287ba.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/657b6a4a49faec5c600287ba.md @@ -16,7 +16,7 @@ Well done. You have completed the Tower of Hanoi practice project. You should reduce the indentation level of all the code after the `return` statement. ```js -({ test: () => assert(__pyodide.runPython(` +({ test: () => assert(runPython(` hanoi = __locals.get("move") a, b, c = [3, 2, 1], [], [] hanoi(3, a, b, c)