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 trialC.J. Doyle
755 Pointskind of confused on this one
Could someone help. Im a little confused on this one
name = "Treehouse loves {}"
print(name.format("Deja Vu"))
subject = "Treehouse loves {}"
print(subject.format("Christopher"))
C.J. Doyle
755 Pointsthank you so much
1 Answer
Oszkár Fehér
Treehouse Project Revieweri did the same thing, but the question is a little different, u don't need to print out, just start with subject = ,and from here it should be easy already, it's just one line, 2 with the previous question
Chris Christensen
9,281 PointsChris Christensen
9,281 PointsHi CJ,
You are close but probably overthought this one. For the "name" variable you only need a string of your name. For the subject, you create another variable with the string "Treehouse loves {}" with .format(name) on the end. The {} is a placeholder for whatever variable you pass through with .format(). In this case, you are passing in your name. Here is what the code looks like:
Hope this helps.
Chris