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

Treehouse is extraordinarily frustrating in Python Basics task 2 of 2.

Unfortunately having the same problem as with other quizzes; what I thought I was taught in the video tutorial just doesn't cut it in the quiz and not one of the 20 different codes I've tried have been accepted, have tried changing everything I can think of and at this point I think it would be more productive if Treehouse could simply correct me and let me know what it wants me to do and then ask me a new question. Instead every time I try a new way of writing the code I'm told its wrong and that task 1 is no longer being accepted. I don't know what I am supposed to do to move on from this task, please help.

Have also tried subject = "Treehouse loves{}" print(subject.format(name)) subject = "Treehouse loves {name}" print(subject.format(name)) subject = "Treehouse loves {}" print(subject.format(Melissa)) etc.

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

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

The grader wants the last two lines combined:

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