Programming is about two things, making your code do what it is supposed to, and doing it in such a way that you can understand the code after the fact. Just like writing an essay, style is important. You wouldn't expect to get a good grade on an essay if you wrote it in broken english, even if it basically said all the right stuff. Similarly, even if your program works perfectly, you won't get a perfect grade if it is hard to read (poorly written stylistically). Practically speaking, probably a third of the grade for each assignment will be based on style, and two thirds on it doing what it is supposed to.
My goal is to grade homework and get it back to you the day after you turn it in. I probably won't always manage this, but it is my goal.
Double check your work before you turn it in. It hurts your grade a lot if you submit something with errors in it that keep it from running at all. And as you will learn during the term, even a single errant character in your program can wreak major havoc on it.