The intro courses don't consist of homework like "write a function which does X", and they aren't graded like "your function produced the correct output".
Instead, the homework consists of week- to two-week-long projects in which the student produces a moderately complex piece of code. Depending on the point in the semester, this could be anything from a collection of pure mutually-recursive functions, a self-contained class with a nice api boundary, a collection of classes to draw some graphics format, or something else entirely.
The homework is always done in pairs, and you're not allowed to work on it unless your partner is present for pair programming. During official lab timeslots, students are told to trade off "driving" (using the keyboard) every 15 minutes to half hour.
Finally, the assignments are graded both on whether they produce the correct output and the clarity and efficiency of the code.
Student pairs are switched up multiple times throughout the semester, and the graders/tutors ("grutors") spend significant amounts of time working with each pair and making sure that both members understand what's going on.