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 trialAva Jones
10,679 PointsWhat am I doing wrong
I have no idea what is wrong, please help
student = {'topic': 'python'}
3 Answers
Shem Ogweno
15,393 PointsHere is one way of doing it!
#Task 1 of 2
student = {
'name': 2,
'topic': 'python'
}
# Task 2 of 2
topic = student['topic']
Shem Ogweno
15,393 PointsThere is nothing wrong with what you are doing! The question wants you to have two key-value but you have only given one
1) key: 'name', value: 2,
2) key: 'topic', value: 'python'.
Ava Jones
10,679 PointsThank you so much for helping
Asher Orr
Python Development Techdegree Graduate 9,409 PointsHi Ava!
The challenge says to include both key:value pairs in the dictionary.
You added the second key:value pair (key: 'topic', value: 'python') correctly. You just need to add the first one:
key: 'name', value: ''
Like this:
student = {key:value, 'topic':'python'}
Ava Jones
10,679 PointsThank you for helping me again!
Ava Jones
10,679 PointsHold on I still got an error, it said that key is not defined
Ava Jones
10,679 PointsAva Jones
10,679 PointsThank you! It helped !