Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Introducing Dictionaries Introducing Dictionaries Creating a Dictionary

Efaz Khan
Efaz Khan
5,194 Points

Must be a bug in the question.

I am pretty sure my code is correct. Can someone please check?

Thank you

student = {'name':"", "topic": "python"}

topic = student["topic"]

No you are not wrong there is most certainly a bug.

In [1]: student = {'name': 'Josh Stephens', 'topic': 'python'}
   ...: topic = student['topic']

In [2]: topic
Out[2]: 'python'

2 Answers

Ok playing around I was able to pass it. Change the value of topic in the student dictionary to be Python with a capital p. Probably the unit tests for this is not doing a case insensitive comparison on the assertion and thus it fails. Assuming that is how they are checking the results

Steven Parker
Steven Parker
216,012 Points

This was previously discovered by another student, but it probably wouldn't hurt to send another bug report in to the Support folks.