@Rouben Rostamian Thanks very much for this additional information. The proc will make it easier to create multiple versions of the same question. I discovered that an added benefit of your approach is that the output from the printf() function can be pasted directly into the question and comment portions of a Canvas essay question, and the formatting is preserved. This will make it easy for me to create multiple versions for an assortment of Canvas questions (e.g., multiple choice, numeric answer, essay) and Canvas will randomly select from these questions for each student. Having the answer attached to the question, visible to the instructor but not to the student, will significantly simplify the grading process. I have read that Maple TA does something similar but at my institution we are committed to using Canvas for on-line assessments.