What did I do wrong?


#1


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)


#2

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


#3

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


#4

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.


#5

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.


#6

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.


#7

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.


#8

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


#9

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()


#10

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:

mm/dd/yyyy
hh:mm:ss

and they want something like this format:

mm/dd/yyyy hh:mm:ss

#11

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.


#12

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


#13

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


#14

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


#15

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


#16

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


#17

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:


#18

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.


#19

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?


#20

Here are some great resources: