CodeLab®:
A Powerful Tool for Programming Instruction
CodeLab is the web-based interactive programming exercise system for
intro programming classes in Python, Java, C++, C and other languages.
First offered in 2002 to reduce attrition and raise the overall level of the class,
it is a seasoned system that has been used in over 200
institutions and analyzed over thirty million
exercise submissions from more than 150,000 students.
A CodeLab has over 300-800 short exercises, each focused on a particular
programming idea or language construct. The student types in code and
the system immediately judges its correctness, offering hints when the
submission is incorrect. Through this process, the student gains mastery
over the semantics, syntax and common usage of the language elements.
Below are a few
exercises from the Arrays and Recursion sections of the C++ CodeLab.
Try these with both correct solutions and common mistakes: