What did I do wrong?


Date and Time

"Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss"

I thought my code was fine

Replace this line with your code. 
print '%s/%s/%s' % (now.month, now.day, now.year)
print '%s:%s:%s' % (now.hour, now.minute, now.second)


You are asked to print it in one line, but you use two lines.


Also, I actualy don't think that the percentage marks are suppossed to be there


You used two lines as mentioned by inter2k3 and your string format %s should include a space after the date and time to get your format correct.


The instructions are poorly worded. I hope that when they release the updated python lessons they will find a way to make the instructions less confusing.

Short is not always sweet.


Yes, I agree; these instructions are so poorly written. I can't get beyond this problem, therefore no progress. The hint is even poorly written, with no apparent solution. This is the same problem that I had with a different code academy, and I could never finish the course. Just show us the freaking answer, so we can move on code academy!!!! Even when you use other solutions to the problem, it still doesn't work. I'm not impressed with code academy right now.


Spoonfeeding isn't a great way to teach. Cheating isn't a great way to learn.
But yes, there needs to be some work done on some instructions for more clarity. However, most of them (and the explanations) only scratch the surface. Codecademy introduces you to some concepts to start your toolkit and it is up to you to expand it.


Are you kidding me??? So I'm to never to get beyond this point then? Interesting!!!


I printed this, and I know it's not right but it worked. Codeacademy, you need to fix this:
1 from datetime import datetime
2 now = datetime.now()
3 print now
4 print '%s/%s/%s' % (now.month, now.day, now.year)
5 print '%s:%s:%s' % (now.hour, now.minute, now.second)
6 print datetime.now()


Don't be pessimistic :slight_smile: Getting upset won't help you. Trust me, I know how frustrating it is when things don't work and how it feels to 'not know what you don't know'.

Your print statements on lines 4 and 5 should be in one line combined.

print '%s/%s/%s %s:%s:%s' % (now.month, now.day, now.year, now.hour, now.minute, now.second)

I believe the instructions are kind of clear to the point that they show you what they want:

Print the date and time together in the form: mm/dd/yyyy hh:mm:ss

What you're printing looks like this format:


and they want something like this format:

mm/dd/yyyy hh:mm:ss


I agree with that after finally figuring that out in the date/time problem after this example. I believe the instructors examples are misleading and lacks clarity.


it should be like this
print '%s/%s/%s %s:%s:%s' % (now.month, now.day, now.year, now.hour,now.minute,now.second)


I think this so hard maybe this so good because want to know this all


Me too!!!!!!! I don't understand! I had the exact thing as the example, and everything I did made sense to me.


I tried that and it didn't work for me. Yeah Codecademy needs to fix the error in their syntax ASAP


This did not work for me. I did everything the same way that you had it, but it still gave me the Error


Well, it is near impossible to help you with the information you've provided so far (vague).
Best to post your code (formatted code is preferred) and the error message you are getting :slight_smile:


Exactly! Yeah, I'm not too impressed with Code Academy's content and their inability to fix faulty content in an expeditious manner. I get the previous comments regarding spoon feeding and figuring it out; however when it's a beginners course FOR BEGINNER's; I think some leeway and mentoring are in order.


So Im 15 years old and really want to "expand my toolkit" but I'm not sure how to. I live in Texas and coding languages are considered foreign languages, so there aren't many options for me in high school currently. Do you have any suggestions after I complete the courses on Codecademy?


Here are some great resources: