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 trialMUZ140348 Sympathy Makururu
10,209 PointsChallenge Task 2 of 4 Create a variable named now that holds the results of datetime.datetime.now().
Challenge Task 2 of 4
Create a variable named now that holds the results of datetime.datetime.now().
import datetime
treehouse_start= datetime.datetime.now()
3 Answers
MUZ141095 Kelvin Chawora
9,348 PointsYour variable's name is supposed to be now, so...your code should be something like this:
import datetime
now = datetime.datetime.now()
Anish Walawalkar
8,534 Pointswell its stated in the question that you have to name the variable "now" so this should do it from you:
import datetime
now = datetime.datetime.now()
Hope that helps
MUZ140348 Sympathy Makururu
10,209 PointsI realized my mistake and worked it out some seconds after posting on this forum. Thanks for the help.
MUZ140348 Sympathy Makururu
10,209 PointsMUZ140348 Sympathy Makururu
10,209 PointsIt passed do not bother, i have seen where i was going wrong:
import datetime now=datetime.datetime.now()