mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-06 12:03:34 -04:00
729 B
729 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 6579ca0923cfa7162089d2f0 | Schritt 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: () => assert.match(code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2.*^print\s*\(\s*copper\s*\)/ms) })
--seed--
--seed-contents--
--fcc-editable-region--
copper = {
'species': 'guinea pig',
'age': 2
}
copper['food'] = 'hay'
print(copper)
--fcc-editable-region--