One important assessment type is debugging questions, where students are given code with an error and are asked to debug it.
Another type is where student are given output like a plot and are asked to write thecode that creates it.
We also use MCQ format to model reading existing code (e.g., in a help forum) and determining what code is relevant to the question.