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

I am not understanding why workspace is giving me an error. Please can somebody help ?

name = "Frenklin Hasani" subject ="Treehouse loves {} " print(subject.format(name))

strings.py
name = "Frenklin Hasani"
subject ="Treehouse loves {} "
print(subject.format(name))

1 Answer

Umesh Ravji
Umesh Ravji
42,386 Points

Hey there Frenklin, it looks like you understand how to write the code required, but you just aren't doing it the way the question is asking.

Once you have your name, it is asking you to create a subject variable that is assigned to the string "Treehouse loves{}" with your name being placed inside using format.

subject = "Treehouse loves {}".format(name)