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

reynier martinez
reynier martinez
1,143 Points

need help

on the work space it works but here no I don't get it

strings.py
name ="reynier"
subject = "treehouse loves {}".format (reynier))
Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Additional posts for this question/thread have been deleted.

Jason - Treehouse Community Moderator

4 Answers

# in this:
name ="reynier"
subject = "treehouse loves {}".format (reynier))
# reynier is not defined
# and you have two closing brackets
# and a space after format

Why did you have to create name variable? Just to have it? Use it.

Christian Mangeng
Christian Mangeng
15,970 Points

Hi Reynier,

1) format subject with your name by using the name variable you defined

2) remove the space after .format

3) remove the additional parenthesis at the end of your code

4) make sure to use a capital T for Treehouse. You need to be exact in the challenges.

So in the end it should look like this:

name = "reynier"
subject = "Treehouse loves {}".format(name)
reynier martinez
reynier martinez
1,143 Points

thanks got it now I keep forgetting about the capital letters