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: String Formatting (Challenge Question 2)

I am running into an issue with Challenge question 2. I am able to run the code in the Shell, without error. However, I receive an error message when I run it in the Code Challenge itself.

I'm not able to paste a screen shot in this message so here is my code: name = "Keith" subject = "Treehouse loves {}." .format(name)

The error I receive is this:

"Bummer! Be sure to use the '{}' placeholder and the '.format() method.

Thanks for your help! Keith

Hey Keith, I just ran you're code, it's actually the period at the end of your subject string that is causing the error. Just take it out. These code challenges can be a bit nit picky at times

3 Answers

Thanks Zachary! That worked!

Thanks Zachary! Worked for me too. It was frustrating because I tested this exact thing out in the python shell and a period had worked in the string so I was so confused during this challenge! Thanks again.

This also pop up "Oops! It looks like Task 1 is no longer passing."