You are allowed to use code and other materials that you have not written yourself as long as you document the sources and admit to the use. In this way you might add to or expand on someone else's work.
Submitting code that you didn't write as if it were your own work is the one unacceptable act in this course.
In many cases I want to encourage you to tackle a hard project, one without a guarentee of final success. If you do good work for the project and produce evidence of your effort, you can get a good grade even if you do not finish the final program or the final program does not work according to specifications. (Projects for a course are different from the environment in the ``real'' world, because absolute requirements are somewhat artificial. If you try something hard, you cannot be sure of success. People who say ``failure is not an option'' may hype themselves up, but they are fools if they have no contingency plans for setbacks.)