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

learn python

finally, create 2 variables named estimate that holds the rounded number of days you have lived and one named summary that adds the string version of estimate into "I am () days old.

days_alive.py
age = 26
days = 9464
decade = 2.6
estimate = 3

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Don't figure the math out yourself, let Python do the work for you.

As for estimate and summary, estimate should use round() to turn your decades float into an integer. summary ends up being a string like "I am 3000 days old! That's about 1 decades!". Again, let Python do this work.

Hello kenneth,

could you please have a look the error I made for the task 3 of the challenges

thank you so much

age = 27 days = age * 52* 7 estimate = round (days) summary = "I am" estimate "days old!"

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

danqing dong Your summary variable isn't be constructed correctly. You need to add the values together with string concatenation (+) or use the .format() method.

decades = 3ooo / 10

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

3ooo isn't going to be valid anywhere since that's a three and three os. You need to actually use 0s