Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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