Before the exam: set a paper that is hard to copy
Most copying in a lab practical happens because copying is easy, not because students set out to cheat. The paper itself is the first defence.
- Write more than one version of each question. Change the numbers, the data or the exact task. Two students side by side with different versions have nothing useful to share.
- Change the order. Even with the same questions, a different order per student means a neighbour is rarely on the same one.
- Ask for output that has to be computed. "Print the sum of the even numbers" can be faked by printing a remembered answer for the sample input. Mark against inputs the students never see.
- Write the test cases before the exam, not after. Decide the expected output for normal, edge and tricky inputs (an empty list, a single item, negative numbers). This is what makes marking consistent across the room.
Check the lab the day before: every computer starts, has the right language installed or the browser you need, and is not logged in to a student's personal account.
During the exam: one screen, one student, one program
The aim during the exam is simple: the only thing on a student's screen should be the paper and their own code.
- Lock the screen to the exam. Use full screen, close messaging apps and browser tabs, and switch off copy and paste if your software allows it. Students can still try to leave; what matters is that leaving is noticed.
- Keep a record, not a suspicion. Note when a student leaves the exam screen and for how long. A record lets you have a calm conversation afterwards instead of an argument.
- Seat students so neighbours have different versions. Hand out versions in a pattern across rows, not down them.
- Plan for the network dropping. School Wi-Fi fails at the worst moment. Students should be able to keep working, with their answers saved on the computer until the connection returns.
- Collect code, not screenshots. Marking from the actual code means you can run it again if a mark is disputed.
Marking: run the code, then read it
A program that prints the right answer for the sample input has not necessarily solved the problem. Run every submission against your full set of test cases, including the ones students never saw. Give marks for each case passed, so a nearly-right program earns something.
Then read the code. Test cases tell you whether it works; reading tells you how. A short rubric keeps this fair across the class:
- Correctness: test cases passed.
- Approach: a sensible method, not a pile of special cases written to match the expected outputs.
- Readability: clear names, sensible structure, comments where they help.
Watch for answers that print expected outputs directly, or that ignore the input. These pass the sample case and fail everything else, and they are worth a conversation, not an automatic zero.
After the exam: results students can learn from
Share which cases each student failed, not just the total. A student who sees that their program breaks on an empty list learns more than one who sees 6 out of 10.
Keep the papers, test cases and marks together. Next year's exam is easier to write when you can see which questions separated the class and which everyone got right.