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 trial

Python Python Basics (2015) Python Data Types String Formatting

why failing when code looks good?

name main test_in_same_context True warningregistry {("unclosed file <io.TextIOWrapper name='/usr/local/lib/ruby/gems/2.3.0/gems/challenge_proctor-0.0.0/lib/challenge_proctor/templates/python.html.erb' mode='r' encoding='ANSI_X3.4-1968'>", , 126): True, ("unclosed file <_io.TextIOWrapper name='strings.py' mode='r' encoding='ANSI_X3.4-1968'>", , 42): True, 'version': 0} test_output {} traceback
__loader
_ <_frozen_importlib_external.SourceFileLoader object at 0x7f40a2920f60> create_preview True subject treehouse loves daniel test_number 1 name daniel

strings.py
name = "daniel"
subject = "treehouse loves {}".format('daniel')

1 Answer

Christian Mangeng
Christian Mangeng
15,970 Points

Hi Daniel,

you are very close. The challenges usually need to be solved exactly the way given in the descriptions. So use a capital T for Treehouse. Also, you can format the string with the name variable, instead of retyping your name.