Back to Freecodecamp

Step 3

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

latest786 B
Original Source

--description--

Keys must be unique within a dictionary and they can be only immutable data types. This means you cannot use a list or another dictionary as keys.

Add another key 'age' to your dictionary and give it the integer number 2 as value.

--hints--

You should have an 'age' key with the value 2 just after 'species': 'guinea pig', inside your copper dictionary. Don't forget the comma.

js
({ test: () => assert(runPython(`
    copper == {"species": "guinea pig", "age": 2}
  `))
})

You should have two key-value pairs in your copper dictionary.

js
({ test: () => assert(runPython(`
    len(copper) == 2
  `))
})

--seed--

--seed-contents--

py
--fcc-editable-region--
copper = {'species': 'guinea pig'}
--fcc-editable-region--