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 trialCaroline Louw
12,155 PointsWhat is wrong with my code? Is the key value pair in the dictionary wrong in this challenge?
In python dictionaries
student = {'name': 'caroline', 'topic': 'life science', 'value':'python'}
topic = student['topic']
1 Answer
Rick Gleitz
47,878 PointsHi Caroline,
I'm not sure how it let you pass the first task. But it did and that caused you to fail the second (your code was correct for the second task). The first task just wanted an empty string '' as a value for the key called 'name', and the string 'python' for the key called 'topic'. That's it, don't add other things in.
Hope this helps!