Ask students to arrange code segments to code without syntax errors.

Give students a set of lines of code and ask students to order them to produce a program with specific behavior. These problems are typically called "Parson’s Problems" and allow students to reason about the logic of the code without having to worry about syntax. You can make this more difficult by including extraneous lines of code that students don’t need to solve the problem.

Example: "Focus on your code's logic by rearranging these lines."

See this and related tips as a Tip Sheet: http://csteachingtips.org/tips-for-assessing-programming

More about this tip