Files
2024-01-24 19:52:36 +01:00

1.0 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
65576ff7888f9e96f52a4be1 Schritt 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 add a new key-value pair to your copper dictionary.

({ test: () => assert(__pyodide.runPython(`
    copper = __locals.get("copper")
    len(copper) == 1
  `))
})

You should have a species key with the value guinea pig inside your copper dictionary.

({ test: () => assert(__pyodide.runPython(`
    copper = __locals.get("copper")
    copper == {"species": "guinea pig"}
  `))
})

--seed--

--seed-contents--

--fcc-editable-region--
copper = {}
--fcc-editable-region--