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 trialHaralambos Tsivikas
7,225 PointsHi I am stuck on this challenge. Any solutions;;
I have issues with the code
student = dictionary{"name": "Oxford", "topic": "Python"}
5 Answers
christopher abjornson
5,572 PointsWhats the question?
Haralambos Tsivikas
7,225 PointsCreate a dictionary with the following key value pairs: 1) key: 'name', value: '', 2) key: 'topic', value: 'python'. Assign this dictionary to a variable called student.
christopher abjornson
5,572 Pointsstudent = dictionary{"name": 2, "topic": "Python"}
The value of name should be 2. Not sure were your value came from. What got me up on this when i was doing it was, i kept putting "2" and its just 2. Don't let it trip you up.
KRIS NIKOLAISEN
54,971 PointsIn creating a dictionary you don't use the word dictionary. As shown in the previous video @ 1:16 you specify key value pairs inside curly braces.
mydictionary = { 'key1' : 'value1', 'key2' : 'value2' }
Also check your values against what the instructions state. Case matters in task 2.
Adam Dunlap
Courses Plus Student 1,899 PointsCHALLENGE: Create a dictionary with the following key value pairs: 1) key: 'name', value: '', 2) key: 'topic', value: 'python'. Assign this dictionary to a variable called student.
This Challenge still uses the question above as Challenge Task 1 of 2 for "Introducing Dictionaries" in Python.
The 'value' in the question just shows up as (") without parenthesis, like OP mentions. I don't know how others figured this out to be the integer 2, but I had no idea what the question was referring to until finding this thread. I still don't understand where Christopher got the answer if the question hasn't been changed since then.
If TeamTreehouse staff gets a chance, please fix this question so that it shows (2) for the value, not ("). Otherwise it doesn't make sense at all, where the 2 comes from.
If it helps, I'm using Firefox on Mac when I see this. Maybe it shows up correctly in other browsers.