When I say ``teams of two students'', I don't mean ``you write the first half of the assignment, and I'll write the second half''; I want both students working together on all of the assignment, using the techniques of Pair Programming (on which I'll give you a reading assignment).
It's hard to define what constitutes ``cheating'' in this sort of course. Students are encouraged to help one another with level-1 and level-2 difficulties (``how do I save this file?'', ``what's the syntax for define-struct?'', etc.), regardless of whether they're on the same team, but designing, coding, testing, and debugging should be done by team members. It's remarkably easy for a professor to notice when three different teams have turned in nearly-identical programs; if that happens, I'll grade it once and divide the credit among the three, so the best any of them can hope for is 33%.
All work on the final exam and the quizzes must be entirely the work of the one person whose name is at the top of the page. If I have evidence that one student copied from another on an exam or quiz, both students will be penalized; see above.