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 trialPablo Vizcaino
1,018 Pointshow can i print a sentence using two separate variables?
in this example, i'm entering:
email_greeting = print("{} loves {}" .format (treehouse, name))
name = "Pablo"
treehouse = "Tree" + "house"
email_greeting = print("{} loves {}".format(treehouse, name))
3 Answers
Stephen Bone
12,359 PointsHi Pablo
To print this line you just need to remove the assignment to the email_greeting variable as below:
print("{} loves {}".format(treehouse, name))
Although to complete the task you only need to assign it to the variable not print it.
Hope it helps!
Stephen
Pablo Vizcaino
1,018 PointsHi Stephen,
Thanks for responding! So for the challenge, it's not asking me to print the string? How do I assign it to the email_greeting variable?
Thanks!
Stephen Bone
12,359 PointsYou just need to remove the print method so it will look like:
email_greeting = "{} loves {}".format(treehouse, name)
Hope it helps!
Stephen
Pablo Vizcaino
1,018 PointsAwesome, thanks for your help!!