I've took on computer science school, now I mainly want to work in IT but I have to go through two years in which I have to study and pass programming. Now first semester, I got a C (because I couldn't come up with a code) and my second semester was cancelled because of covid. This is my third and I have a huge problem coding. My exam will have a specific question and give you all the details and variables I UNDERSTAND what the program should do, I know the syntax, I just don't know where to begin. And then my code will have all those errors (especially long codes) that I don't know how they originated despite me following the rules very closely. Now if I look at my friend's solution, I'll think "That was easy, why couldn't I think of this?"
What is your train of thought when solving a problem?