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

addisonloda
addisonloda
390 Points

Help needed from anyone who is willing to help.

I am working on the quiz in the Exceptions lesson of Things That Count in Python, and I'm on the very last step where I have to write actual code to submit. Basically I needed to make a variable with my age, then another variable with the amount of days (age * 52) * 7, then a decades variable (age / 10). All of that was good, and it passed, but now I had to make an estimate variable, and a summary variable. The estimate one is used to round the decades variable to the nearest whole number, and I assume it would just be estimate = round(decades) (I may be wrong), and the summary is to say "I am {} days old! That's about {} decades!" using the above variables. I have tried everything that I could think to try, and the video doesn't really touch on exactly how to do something like this. I know that I'm supposed to make it into a string, and I know that I have to input the estimate instead of the decades variable, but I don't know how to construct it.

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

I definitely talk about this in the videos. Check the String Formatting video again. It looks like you're really close!

addisonloda
addisonloda
390 Points

I tried with the curly brackets earlier, and I just realised that I forgot to add a second parenthesis at the end. I noticed you did that int he video, too, so I tried it again and it worked. Thanks so much!