Sometimes new students do not understand the difference between copying code (cheating) and working with others to complete a project (collaboration). This post will try to define the difference between the two.
Many times to finish a project you my have to work in groups or with other students. Cheating would be taking someones elses function or method, and copying it in whole. An example of collaboration would be asking for help and fixing the code you already have to work properly. You should make a good solid effort to write your own code before asking for help.
It may be tempting to Google an algorithm and use it in whole for your project. Teachers tend to frown on this as you are not really learning how to write said algorithm. An example would be a bubble sort. You can find a bubble sort function for every language on the internet. The goal of all programming classes is to teach you how things should work, therefore you should write your own code before consulting other peoples code. If you do end up getting code from somewhere else, make sure you know how it works. One thing we do not need is anymore copy paste coders entering the market. These programmers will quickly be shed as they do not have the required problem solving skills.
Main point here is that if you just copy all of your code without writing your own, you will not be able to solve a problem when you get into the real programming world. I know many students that cannot solve problems them selves, but are in high level programming classes. Just because you have a degree in the field doesn't mean you are proficient in your degree field.