Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRamez Kanj
5,616 PointsI dont understand the error
On an empty line beneath the existing code, create a variable called topic and assign to this variable the value of the topic key in the student dictionary.
Bummer: Whoops, looks like the topic variable is assigned to the wrong value. Check that the topic key has the correct value in the student dictionary, and check that you're accessing this value correctly.
student = {'name':'Ramez', 'topic':'computer', 'python':'Dictionaries'}
topic = student['topic']
1 Answer
Steven Parker
231,269 PointsApparently the challenge doesn't check task 1 very thoroughly.
The instructions for task 1 asked for a dictionary where the second pair was key: 'topic', value: 'python'
. So the assignment for task 2 is getting the value "computer" but the challenge is expecting "python".
Also, this doesn't affect the result but the instructions did not ask for a third pair in the dictionary.