mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 02:14:11 -05:00
822 B
822 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 6579ca0923cfa7162089d2f0 | Step 8 | 20 | step-8 |
--description--
The same syntax can be used to change the value of an existing key.
Just before the print() call, access the 'species' key and reassign its value to 'Cavia porcellus'.
--hints--
You should reassign the copper['species'] to the string 'Cavia porcellus' before the print() call.
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
assert.match(commentless_code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2\s+^print\s*\(\s*copper\s*\)/m)
}
})
--seed--
--seed-contents--
--fcc-editable-region--
copper = {
'species': 'guinea pig',
'age': 2
}
copper['food'] = 'hay'
print(copper)
--fcc-editable-region--