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 trialSantos Solorzano
3,125 PointsHello! I got stuck where it asks to create the email_greeting variable. I am not sure what it is asking...
Challenge task 3 of 3
1 Answer
Kristen Law
16,244 PointsIt wants you to assign the string "Treehouse loves YourName"
to a variable called email_greeting
, using the variables you created earlier: treehouse
and name
. You can accomplish this by using the format
method on a string. You put {}
inside the string as a placeholder for your variable, and then you pass your variable in to the format method. If there is more than one {}
in your string you separate your variables with a comma.
See below:
email_greeting = "{} loves {}".format(treehouse, name)