Back to Freecodecamp

Step 14

curriculum/challenges/english/blocks/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md

latest766 B
Original Source

--description--

Now that you reviewed the basic aspects of dictionaries, you can proceed to build the shortest path algorithm.

Delete every line of code after the declaration of the copper dictionary.

--hints--

You should delete all the lines of code after the declaration of your dictionary.

js
({ test: () => {
    const commentless_code = __helpers.python.removeComments(code);
    assert.isFalse( /copper\s*\[.*?\]|del|for|print\s*\(.*?\)/ms.test(commentless_code))
  }
})

--seed--

--seed-contents--

py
copper = {
    'species': 'guinea pig',
    'age': 2
}
--fcc-editable-region--
copper['food'] = 'hay'
copper['species'] = 'Cavia porcellus'
del copper['age']

for i, j in copper.items():
    print(i, j)
--fcc-editable-region--