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 trialKevin Jervis
2,600 PointsWorking out my age in days
Hi
I have got so far in this particular task and got stuck trying to work out my age in days but not sure about the next step:
years = 38 days = 38 * 365
Thanks Kevin
years = 38
days = 38 * 365
4 Answers
Michael Hulet
47,913 PointsYou're definitely on the right track, but the challenge asks you to use the years
variable to multiply instead of typing out your age in years again. You're right that years
would be 38
at that point, but instead of writing 38
again, if you use years
, you'll pass the challenge
Lester Peterkin
10,359 PointsDo you noT have To consider leap years? This would make The challenGe a liTTle more challenGinG
Michael Hulet
47,913 PointsNope, leap years and such are not necessary. This challenge is mostly just to get you acquainted with multiplication and variables in Python
Lester Peterkin
10,359 Points[Moderator redacted]
Michael Hulet
47,913 PointsYup, that looks good! Also, I prettified your code a bit to make it easier to read here. You can do this in the future, too. You can read about how in the Markdown Cheatsheet linked under every comment box, or you can just press the "Edit" button on your answer. I also highly recommend the Markdown Basics to learn more about what you can do with it
Michael Hulet
47,913 PointsAlso, it just occurred to me that you're not the OP, so I should point out that it's frowned upon here to post a copy/paste solution to a challenge with no explanation whatsoever. If you'd like, feel free to add it back, but with a bit of explanation of why that's the answer. Thanks for helping out around the Community!
Lester Peterkin
10,359 PointsI am not sure what happened did the moderator deem my input too revelatory
Jennifer Nordell
Treehouse TeacherLester Peterkin answers that can be copy/pasted into a challenge simply to pass the challenge with no explanation whatsoever are not terribly helpful to the original poster in terms of learning a concept. As such, the answer has been altered. But you are free to change it back, provided you also add an explanation of why/how your code works
Kevin Jervis
2,600 PointsThank you for your help guys. I appreciate it. Onto the next stage now :o)