diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md index 57a4feee4b3..2a7bb37224d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md @@ -24,7 +24,6 @@ You should add a new key-value pair to your `copper` dictionary. ```js ({ test: () => assert(__pyodide.runPython(` - copper = __locals.get("copper") len(copper) == 1 `)) }) @@ -34,7 +33,6 @@ You should have a `species` key with the value `guinea pig` inside your `copper` ```js ({ test: () => assert(__pyodide.runPython(` - copper = __locals.get("copper") copper == {"species": "guinea pig"} `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 7603c11abc3..4ed1a1b61e2 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -15,8 +15,7 @@ Your dictionary should have an `A` key. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - "A" in graph + "A" in my_graph `)) }) ``` @@ -25,8 +24,7 @@ Your `A` key should have `B` as the value. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - graph["A"] == "B" + my_graph["A"] == "B" `)) }) ``` @@ -35,8 +33,7 @@ Your dictionary should have an `B` key. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - "B" in graph + "B" in my_graph `)) }) ``` @@ -45,8 +42,7 @@ Your `B` key should have `A` as the value. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - graph["B"] == "A" + my_graph["B"] == "A" `)) }) ``` @@ -55,8 +51,7 @@ Your dictionary should have two keys. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - len(graph) == 2 + len(my_graph) == 2 `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index 6a847261ed8..30eb86359cf 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -17,9 +17,8 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") key_list = ["A", "B", "C"] - len(graph) == 3 and all(key in graph for key in key_list) + len(my_graph) == 3 and all(key in my_graph for key in key_list) `)) }) ``` @@ -28,8 +27,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - graph["A"] == "B" + my_graph["A"] == "B" `)) }) ``` @@ -38,8 +36,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["B"]) is list + type(my_graph["B"]) is list `)) }) ``` @@ -48,8 +45,7 @@ The value of `my_graph["B"]` should be a list containing the other two nodes. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - len(graph["B"]) == 2 and "A" in graph["B"] and "C" in graph["B"] + len(my_graph["B"]) == 2 and "A" in my_graph["B"] and "C" in my_graph["B"] `)) }) ``` @@ -58,8 +54,7 @@ The value of `my_graph["C"]` should be the connected node. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - graph["C"] == "B" + my_graph["C"] == "B" `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 593e763fee0..5f036d03199 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -15,9 +15,8 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") key_list = ["A", "B", "C", "D"] - len(graph) == 4 and all(key in graph for key in key_list) + len(my_graph) == 4 and all(key in my_graph for key in key_list) `)) }) ``` @@ -26,8 +25,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["A"]) is list + type(my_graph["A"]) is list `)) }) ``` @@ -36,8 +34,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - len(graph["A"]) == 2 and "B" in graph["A"] and "D" in graph["A"] + len(my_graph["A"]) == 2 and "B" in my_graph["A"] and "D" in my_graph["A"] `)) }) ``` @@ -46,8 +43,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["B"]) is list + type(my_graph["B"]) is list `)) }) ``` @@ -56,8 +52,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - len(graph["B"]) == 2 and "A" in graph["B"] and "C" in graph["B"] + len(my_graph["B"]) == 2 and "A" in my_graph["B"] and "C" in my_graph["B"] `)) }) ``` @@ -66,8 +61,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["C"]) is list + type(my_graph["C"]) is list `)) }) ``` @@ -76,8 +70,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - len(graph["C"]) == 2 and "B" in graph["C"] and "D" in graph["C"] + len(my_graph["C"]) == 2 and "B" in my_graph["C"] and "D" in my_graph["C"] `)) }) ``` @@ -86,8 +79,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["D"]) is list + type(my_graph["D"]) is list `)) }) ``` @@ -96,8 +88,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - len(graph["D"]) == 2 and "A" in graph["D"] and "C" in graph["D"] + len(my_graph["D"]) == 2 and "A" in my_graph["D"] and "C" in my_graph["D"] `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 54064297cc5..6f61c5014e6 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -29,9 +29,8 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") key_list = ["A", "B", "C", "D"] - len(graph) == 4 and all(key in graph for key in key_list) + len(my_graph) == 4 and all(key in my_graph for key in key_list) `)) }) ``` @@ -40,8 +39,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["A"]) is list and all(type(i) is tuple for i in graph["A"]) + type(my_graph["A"]) is list and all(type(i) is tuple for i in my_graph["A"]) `)) }) ``` @@ -50,9 +48,8 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") tuples = [("B", 3), ("D", 1)] - len(graph["A"]) == 2 and all(t in graph["A"] for t in tuples) + len(my_graph["A"]) == 2 and all(t in my_graph["A"] for t in tuples) `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 7bce57b47fc..4fb650e4d04 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -18,8 +18,7 @@ You should have a `shortest_path` function. ```js ({ test: () => assert(__pyodide.runPython(` import inspect - f = __locals.get("shortest_path") - inspect.isfunction(f) + inspect.isfunction(shortest_path) `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 069930577af..52e613f38d1 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -18,8 +18,7 @@ Your function should accept `graph` and `start` as the parameters, in this order ```js ({ test: () => assert(__pyodide.runPython(` import inspect - f = __locals.get("shortest_path") - sig = str(inspect.signature(f)) + sig = str(inspect.signature(shortest_path)) sig == '(graph, start)' `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index e26a4ea9f50..4046208d0e0 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -24,8 +24,7 @@ The `target` parameter should have the default value of an empty string. ```js ({ test: () => assert(__pyodide.runPython(` import inspect - foo = __locals.get("shortest_path") - sig = str(inspect.signature(foo)) + sig = str(inspect.signature(shortest_path)) sig == "(graph, start, target='')" `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index dd4d8cf8566..e4b308791e5 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -15,8 +15,7 @@ Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["B"]) is list and all(type(i) is tuple for i in graph["B"]) + type(my_graph["B"]) is list and all(type(i) is tuple for i in my_graph["B"]) `)) }) ``` @@ -25,9 +24,8 @@ Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") tuples = [("A", 3), ("C", 4)] - len(graph["B"]) == 2 and all(t in graph["B"] for t in tuples) + len(my_graph["B"]) == 2 and all(t in my_graph["B"] for t in tuples) `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index 15f4c66885c..47c592c584c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -15,8 +15,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["C"]) is list and all(type(i) is tuple for i in graph["C"]) + type(my_graph["C"]) is list and all(type(i) is tuple for i in my_graph["C"]) `)) }) ``` @@ -25,9 +24,8 @@ In the same way, modify the remaining two lists considering that the `C-D` dista ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") tuples = [("B", 4), ("D", 7)] - len(graph["C"]) == 2 and all(t in graph["C"] for t in tuples) + len(my_graph["C"]) == 2 and all(t in my_graph["C"] for t in tuples) `)) }) ``` @@ -36,8 +34,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") - type(graph["D"]) is list and all(type(i) is tuple for i in graph["D"]) + type(my_graph["D"]) is list and all(type(i) is tuple for i in my_graph["D"]) `)) }) ``` @@ -46,9 +43,8 @@ In the same way, modify the remaining two lists considering that the `C-D` dista ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") tuples = [("A", 1), ("C", 7)] - len(graph["D"]) == 2 and all(t in graph["D"] for t in tuples) + len(my_graph["D"]) == 2 and all(t in my_graph["D"] for t in tuples) `)) }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 10147219640..ba42ecc716a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -26,7 +26,6 @@ You should modify `my_graph` into the provided graph. ```js ({ test: () => assert(__pyodide.runPython(` - graph = __locals.get("my_graph") g = { 'A': [('B', 5), ('C', 3), ('E', 11)], 'B': [('A', 5), ('C', 1), ('F', 2)], @@ -35,7 +34,7 @@ You should modify `my_graph` into the provided graph. 'E': [('A', 11), ('C', 5), ('D', 9)], 'F': [('B', 2), ('D', 3)] } - graph == g + my_graph == g `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md index ffd25cb2bcc..6632b6afc90 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md @@ -28,7 +28,6 @@ Your `copper` variable should have the value of an empty dictionary. Use a pair ```js ({ test: () => assert(__pyodide.runPython(` - copper = __locals.get("copper") copper == {} `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md index a21a0d20e04..d54773ceaea 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md @@ -17,7 +17,6 @@ You should add a new key-value pair to your `copper` dictionary. ```js ({ test: () => assert(__pyodide.runPython(` - copper = __locals.get("copper") len(copper) == 2 `)) }) @@ -27,7 +26,6 @@ You should have an `age` key with the value `2` just after `'species': 'guinea p ```js ({ test: () => assert(__pyodide.runPython(` - copper = __locals.get("copper") copper == {"species": "guinea pig", "age": 2} `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md index ef6db1182f0..018c73c658d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md @@ -26,7 +26,6 @@ You should not modify your dictionary. ```js ({ test: () => assert(__pyodide.runPython(` - copper = __locals.get("copper") copper == {"species": "guinea pig", "age": 2} `)) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index a53dc2c5cd2..6f399782d1a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -26,7 +26,6 @@ Your `my_graph` variable should be a dictionary. ```js ({ test: () => assert(__pyodide.runPython(` - my_graph = __locals.get("my_graph") type(my_graph) is dict `)) })