Brent LiangPro Student 2,944 Points
Code challenge question
Question asks to write a function named delorean that takes an integer &return a datetime that is that many hours ahead.
What's wrong with my code?
import datetime def delorean (num): starter = datetime.datetime(2015, 10, 21, 16, 29) endtime = starter + datetime.timedelta (hours = num) return endtime
Ryan S27,268 Points
The issue is that the "starter" variable that was defined for you in the challenge must remain outside of the function. You incorporated it into your function and that is why it is not passing.