Scaffolding in sample code

Learn how to create the scaffolding in your course to redact sample code.

Yashas Roy avatar
Written by Yashas Roy
Updated over a week ago


I’m not sure how to correctly create scaffolding in the sample code of an exercise. 


Use three underscores for R and SQL courses. Python courses use four underscores. In some instances, you can leave a blank line instead of underscores, but the students should be far enough along in the course or advanced enough to understand what they should fill in.


# A variable assignment in R
___ <- ___

# A function without arguments

# Functions with one and two arguments

# Scaffolding for a single object

# A blank line for more advanced students

# Indicating a string object
___ <- "___"

You can create scaffolding in any part of your code, but you need to make sure that your instructions are related to your chosen scaffolding. If your instruction is related to code that has already been filled in, you've wasted an instruction and likely left out an instruction that was necessary. If you decide to change your code/scaffolding part way through your course, you need to change your instructions too.

Did this answer your question?