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!
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
Carole Cox429 Points
Should the formula in the challenge be weeks = days /52 ?
The problem may be incorrect...just sayin...:-)
Chris FreemanTreehouse Moderator 68,404 Points
The total weeks would be either the total days / 7:
(years * 365) / 7,
or be the number of years * "weeks per year". While these would be close, "
years * 52" would be an integer number of weeks, while dividing the total days by 7 would yield a more accurate floating point result.
>>> years = 32 >>> days = 365 * years >>> weeks_from_days = days / 7 >>> weeks_from_years = years * 52 >>> weeks_from_years 1664 >>> weeks_from_days 1668.5714285714287