The idea that code that doesn't compile is not worth partial credit is wrong in academics. In the real world the code needs to compile first, of course, then run. However if your professors cannot look at your code that doesn't compiler and decide how much partial it is worth there is a problem.
That said, getting code to compile is a trivial part of the problem.
This is not true in my experience as a professional. I write pseudocode all the time. Often the fastest way to evaluate architecture choices is to sketch out your architecture, sketch the consumers of your proposed API, and see what issues come up.
Making this kind of code compile is a waste of time. Reading code without the computer is a crucial skill.
Graders require compiling code because it's easier to grade.
75% of the grade was compiles and works, and the rest was style, readability, and performance.
If it didn't compile, you basically failed the assignment, if it didn't work you could get up to, but not more than a C, 75 out of 100.
Generally the task is not writing code, it is solving a specific problem and non-compiling code is a non-solution, not a partial one.
What about pseudo code that has the "right logic" but will never compile?
What if I submit python code that works as a c file, should that count?
I studied CS and Philosophy. I could phone in a philosophy paper if I wanted. I could not phone in a linked list implementation. I know companies loathe the idea like no other, but software engineering is a skill that is difficult for most people to acquire and is likely to remain that way. Mostly it boils down to peoples understanding and value they place on logic. Anyone with a good grasp on, or even just a high value for logic, can learn to code. No one who sees logic as 'nitpicking' can learn to build systems that function predictably, reliably, and accomplish a defined goal.