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

Nick Honegger
seal-mask
.a{fill-rule:evenodd;}techdegree
Nick Honegger
Front End Web Development Techdegree Student 8,773 Points

Task 1 no longer passing

Every time I add estimate = it says Task 1 is no longer passing.

age = 23
days = age * 52 * 7
decades = age / 10

estimate = decades.int 

summary = "I am {} days old! That's about {} decades!" (days, estimate)

That is the code I'm trying, did I mess something up in the beginning that is causing that error in particular?

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

decades, a float, doesn't have an attribute named int, so decades.int will throw an exception.

Since all of the previous tests are run against every step, the exception is making the test runner thing step 1 is failing.

2 Answers

Logan R
Logan R
22,989 Points

You need to round your estimate, not make it an integer.

You also forgot to add .format the end of your summary.

estimate = round(decades)

summary = "I am {} days old! That's about {} decades!".format(days, estimate)

Hope this helps you out!

Hi Nick,

For estimate you want to round off the decades using the round() function.

For the summary variable you're missing .format