mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 10:00:39 -04:00
957 B
957 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 65576ff7888f9e96f52a4be1 | Paso 2 | 20 | step-2 |
--description--
Dictionaries store data in the form of key-value pairs. A key is separated from the correspondent value by a colon. And each key-value pair is separated from the following pair by a comma:
my_dict = {
'name': 'Michael',
'occupation': 'Lumberjack'
}
Add a new key-value pair to your dictionary. Use the string 'species' as the key, and the string 'guinea pig' as the value.
--hints--
You should have a 'species' key with the value 'guinea pig' inside your copper dictionary.
({ test: () => assert(runPython(`
copper == {"species": "guinea pig"}
`))
})
Your copper dictionary should have a single key-value pair.
({ test: () => assert(runPython(`
len(copper) == 1
`))
})
--seed--
--seed-contents--
--fcc-editable-region--
copper = {}
--fcc-editable-region--