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 trialSue Dough
35,800 PointsSummary variable Question
What is wrong with the summary variable? It keeps saying it looks like step 1 is no longer working when ever I submit it.
age = 1337
days = 1337 * 52 * 7
estimate = round (days)
summary = ("I am " + estimate + " days old!")
3 Answers
Mikael Enarsson
7,056 PointsPython doesn't allow implicit conversions between int
s and string
s. Just slap on a bit of explicit conversion with str()
and you should be fine ^^
MUZ140153 Tatenda Zimba
2,782 Pointssince age= 1337, days = age * 52 * 7
Also,
summary = "I am " + str(estimate) + " days old!"
Sue Dough
35,800 PointsThank you!
Kenneth Love
Treehouse Guest TeacherJust updated this code challenge to make that last step make more sense.
Sue Dough
35,800 PointsAwesome Kenneth! Loving python. I hope you can dip into beautifulsoup or other similar tools. I want to really learn Python to be able to scrape data and do stuff like that.
Sue Dough
35,800 PointsSue Dough
35,800 PointsThank you!