mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-06 21:00:24 -04:00
1.2 KiB
1.2 KiB
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 6557709b0aee699a6a00528c | Schritt 12 | 20 | step-12 |
--description--
Now, replace the existent keys with the strings A and B — one for each node. Then, replace each value with the string representing the node connected to the key.
--hints--
Your dictionary should have an A key.
({ test: () => assert(__pyodide.runPython(`
graph = __locals.get("my_graph")
"A" in graph
`))
})
Your A key should have B as the value.
({ test: () => assert(__pyodide.runPython(`
graph = __locals.get("my_graph")
graph["A"] == "B"
`))
})
Your dictionary should have an B key.
({ test: () => assert(__pyodide.runPython(`
graph = __locals.get("my_graph")
"B" in graph
`))
})
Your B key should have A as the value.
({ test: () => assert(__pyodide.runPython(`
graph = __locals.get("my_graph")
graph["B"] == "A"
`))
})
Your dictionary should have two keys.
({ test: () => assert(__pyodide.runPython(`
graph = __locals.get("my_graph")
len(graph) == 2
`))
})
--seed--
--seed-contents--
--fcc-editable-region--
my_graph = {
'species': 'guinea pig',
'age': 2
}
--fcc-editable-region--