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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Kyle Hahnel](https://secure.gravatar.com/avatar/886772d4193004be02692822ab08f9e7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kyle Hahnel
210 Pointsdays_alive.py Task 1 no longer working
I can complete task 1 and 2, but when I attempt to make the summary variable I get a message saying task 1 is no longer working. I'm not sure if it is my attempt at the summary variable that is breaking it or not.
6 Answers
![Chris Freeman](https://uploads.teamtreehouse.com/production/profile-photos/1153532/micro_image.jpg)
Chris Freeman
Treehouse Moderator 68,425 PointsSometimes the validation is a stickler. Your string has an extra space after the 'old!' Try removing the space.
![Kenneth Love](https://uploads.teamtreehouse.com/production/profile-photos/710512/micro_TeacherShoot-Kenneth.jpg)
Kenneth Love
Treehouse Guest TeacherCan you show us your code?
![Chris Freeman](https://uploads.teamtreehouse.com/production/profile-photos/1153532/micro_image.jpg)
Chris Freeman
Treehouse Moderator 68,425 PointsIt would help to post your code. When you see "task 1 is no longer working" it can mean a syntax error has been introduced. Use the "Return to task 1" to run the failing code in task 1. If no return button is present, copy your current task 2 solution and reload the page to get back to task1.
![Kyle Hahnel](https://secure.gravatar.com/avatar/886772d4193004be02692822ab08f9e7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kyle Hahnel
210 Pointsage = 25
days = (age * 52) * 7
summary = ("I am {} days old! ".format(days))
![Kenneth Love](https://uploads.teamtreehouse.com/production/profile-photos/710512/micro_TeacherShoot-Kenneth.jpg)
Kenneth Love
Treehouse Guest TeacherThis passes for me. Are you still getting a Bummer message?
![Kyle Hahnel](https://secure.gravatar.com/avatar/7f351bb88a1fb86d57dce11b9b8102b8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kyle Hahnel
Python Web Development Techdegree Student 5,670 PointsI had to remake my account, didn't know I get a company discount ;)
It passed when I made my way back to this section and entered the text again.
![charles santana](https://secure.gravatar.com/avatar/3366c7e9ce73e0ecf458601aa433d939?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
charles santana
201 PointsI am little confused why we have to put .format(days) I think it has to do with {} that I am confused about it's part of the string are we using that to cal days?
![Chris Freeman](https://uploads.teamtreehouse.com/production/profile-photos/1153532/micro_image.jpg)
Chris Freeman
Treehouse Moderator 68,425 PointsThe .format()
isn't strictly required by Python, the challenge asks for it because it's good style.
As a beginner, you could have build up the string using the less favored string addition
# string addition
summary = "I am " + str(days) + " days old!"
# string formatting
summary = "I am {} days old!".format(days)
# there is also the old % format - Don't use (revisit when you get to python logging)
summary = "I am %s days old!" % days
The {}
is a replacement field marker used by .format()
. Each field is replaced with items in the .format()
argument list. Some examples can be found here
Chris Freeman
Treehouse Moderator 68,425 PointsChris Freeman
Treehouse Moderator 68,425 PointsThis code worked for me:
Note: the above code was added using an iPhone. With the narrow screen, I had to aggressively wrap my lines!