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 trialRaymond Clark
2,497 PointsNeed help figuring out this challenge
The result seems correct but when i submit it, it say's "X Bummer, try again" I suspect it has to do with the "starter" variable being placed inside the function. Does it want it outside of the function?
import datetime
def delorean(num):
starter = datetime.datetime(2015, 10, 21, 16, 29)
hours = datetime.timedelta(hours=num)
return starter + hours
1 Answer
Steven Parker
231,248 PointsWhen you have a guess about the cause of an issue, you might want to just give it a try before asking for help. Sometimes, like in this case, your intuition will be spot on!
Also, just in general, you won't want to modify the code a challenge gives you to start with unless the instructions tell you explicitly to do so. Most times, your solution should be made with code added to the provided starter code.