Using open source code in solving course exercises Is it normal in computer science courses that one can't use open source code to solve exercises on courses even if the licenses of the code allows to use the code? I was confused as I used some code, gave source where I found the original code but still the lecturer said we have to learn to do the code on my own.
This is a quite generic question, so there is no real answer to it. You need to look at it from the course perspective as well as from the Open Source license perspective.

There are different Open Source licences available, but most of these should allow you to use them for creating derivative work. This might mean Open Sourcing your solution also though (in case of a copyleft license such as GPL).

I however suspect that your course wanted to teach you more basic concepts, therefore expecting you to come up with a solution by yourself. There is no clear answer to your question, however, more complex exercises would nearly always rely on the usage of Open Source software, such as SDKs, programming languages, libraries and frameworks.