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
ja5on
10,339 PointsStuck with python task age calc.py
stuck on line 18
Can't find which lesson it was either, It is in the python basics
1 Answer
jb30
45,415 PointsIn line 12, a = print("{}".format(name), "in", (age + twentyFive_years), "you will be 25."), a is set to the value returned from the print statement, but print statements return None, so a is None.
Instead of comparing years_alive and a in lines 22 and 24, try comparing years_alive and age + twentyFive_years. If years_alive is less than age + twentyFive_years, use the print statement from line 12.