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 (2015) Python Data Types Age Calculation

multiply the number years 34 by the number of days in a year. We'll ignore leap years, so just multiply years by 365

i have ben stuck on this for 2 days now i need help please

age.py
years = 34
 365 * 'years'

1 Answer

Hello Phil,

You are doing great! You have the right idea in mind :+1:

But be careful.

  • :warning: You did not assign the days calculated to a variable called days. The challenge asked you to do so.
  • :warning: If you put a variable name in quotes, Python will think it is a string, which is a piece of text. Obviously you do not need any text to solve the problem, you only need numbers. So to actually get the value within years, you need to remove the quotes.

Once you've fixed the second line, it should look somewhat like this:

days = 365 * years

Happy coding! :zap: ~Alex