and sometimes it should be at least a bit messy.
Derived from Teaching Tech Together by Greg Wilson
Examples of these exercise types in a Jupyter notebook
Code & Run - learner asked to write code that produces a specified output
Inverting Code & Run - learners asked to write tests to determine whether a piece of code conforms to a spec
Fill in the Blanks - learner is given some starter code and has to complete it so that the code produces a specified output
Parsons Problem - learners given lines of code that need to be rearranged to generate a specified output
Minimal Fix - given a few lines of code that contain a bug, the learner must find it and make one small change to fix it
Multiple choice questions - learners asked to choose the correct answer (works best with relevant distractors present)
Diagrams - provide them with a diagram and a set of labels and have them put the latter in the right places on the former
Matching - learner is asked to match labels in one column with text in another
Autograding
Code review