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

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

That escalated quickly

Working on this new python course.

Question 1: Create a variable named age that contains your age.

Question 2: Now, create a variable named days that is your age multiplied by 52 (we'll pretend today is your birthday) and divided by 7.

age = 25

days = (age*52/7)

Perfect. That was easy.

And then question 3 is just BAM Finally, create 2 new variables, one named estimate that holds the rounded number of days you've lived and, one named summary that adds the string version of estimate into "I am {} days old!”.

Uh ... I have no idea.

This ain't it:

estimate = round(len(days)
summary = "I am {} days old!".format(estimate)

Not if I put brackets around them either.

Please help.

on question three. you just have to do the string formatting concept e.g

summary = "i am {} days old".format(days)

4 Answers

Joseph Kato
Joseph Kato
35,340 Points

You just need to omit the call to the len function, leaving:

estimate = round(days)
summary = "I am {} days old!".format(estimate)
Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

Thanks :) Clearly I don't understand the code yet aha Was just trying to mimic what the tutorial did.

Much appreciated.

estimate=round(days) summery="I am{} days old!".format (estimate)

summery="i am{27*52*7} days old!".