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 (Retired) Things That Count Things That Count

I am writing the corect code for 3rd answer but it is asking me to go back to 1st answer and showing that it doesn't exi

My 1st and 2nd answers are correct and when m trying to run the code for 3rd one,it is asking me to go back to 1st one.

days_alive.py
age = 25
print (str(age))

days = str(age*52*7)

summary = str(days)
print "I am" + summary + "days old!"

1 Answer

Dan Johnson
Dan Johnson
40,532 Points

Usually when an earlier task that was passing fails later in the challenge, it's from a syntax error. In this case it's probably from this line:

print "I am" + summary + "days old!"

In the more recent versions of Python, using print without parentheses is no longer allowed.

The challenge is just looking for the variable summary to be set properly to the string so you can get rid of all the calls to print and remove the cast to a string on days

I really appreciate your help. Thanks so much.