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 trialcharles mills
1,856 Pointsemail_greeting assignment
I am having trouble with this assignment. I want to create a variable, or a string? and I have to append the last two variables? I am unsure of how to go about this. Thanks
name = "charles"
treehouse = "Tree"+ "house"
email_greeting = print({} loves {} .format(name,treehouse)
1 Answer
Kristen Law
16,244 PointsHey Charles!
You're close! We're not trying to print anything out though, we're just assigning a string to email_greeting
, so you do not need the print
in there.
The format
method needs to be called on a string, so if you surround {} loves {}
with quotes and then call the format method on it, it should work properly. Also, I believe they want the treehouse
variable to go first, so if you switch name
and treehouse
you should be good to go.
Hope that helps!