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,639 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,639 PointsThank you so much for helping
Asher Orr
Python Development Techdegree Graduate 9,408 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,639 PointsThank you for helping me again!
Ava Jones
10,639 PointsHold on I still got an error, it said that key is not defined
Ava Jones
10,639 PointsAva Jones
10,639 PointsThank you! It helped !