Short-coding questions may appear in homework and quizzes. In both type of assessments, I allow students to have unlimited attempts, without getting any penalty for having the question marked as incorrect.
a) Example with randomized variables that are displayed in the problem statement:
The highlighted parameters are generated at random by the setup code and displayed in the problem statement. The use of randomized parameters helps mitigating some of the cheating that may appear during asynchronous quizzes
b) Example with randomized variables that are provided by the setup code:
In this other example, the variables emp_yoe
, emp_salaries
and cand_yoe
are generated randomly by the setup code, such that students get different datasets to solve the question.
The test code will check for typical conceptual mistakes students make in this type of question, and attempt to get meaningful feedback to guide students towards the correct solution. The figure below illustrates some of the typical mistakes students will make in this question, and the feedback message provided by the test code.