Annotate code

Each line or section of a program explained.

As the student meets it, replayed

Explain what each line of the loop does.

for i in range(1, 6):
    total += i
print(total)
Line 1
Line 2
Line 3
Each line's note to your queue
The facts
Category
Specialised input. Maths, code, music, chemistry.
The student gives
A program, or an answer about one
Marked
By you, or by Procto AI against your rubric when you ask
The prompt carries
Text, and anything you add
In the builder
Now.
Settings this template rules out

None. Every setting of a quiz applies to it.

About annotate code.

Why this shape

Each line or section of a program explained: reading code deeply, the review skill.

An example. Explain what each labelled section of this program does.

What it is

Specialised shapes fit particular subjects: a maths expression typed and checked, working shown step by step, code read or written, a chemical equation balanced, notes on a staff, cells in a grid, a number scored by how close it is, a passage highlighted.

Why it is needed

Every field has a form of answer that the general shapes mangle: an equation is not a word, a proof is not a paragraph, a program is not prose. A shape built for the form marks what the field marks and nothing else, and it lets Procto AI write questions in the form the subject uses.

When to use it

Use the maths shapes for calculation and working, the code shapes for programming courses and hiring, the chemistry shape for equations, estimation wherever a range is the honest answer, and highlighting for reading with evidence.

How to write one well

State the form the answer must take: an expression, a number to a given precision, a balanced equation, a language. Give the tolerance where a range is acceptable. For working, mark each step in the rubric so partial credit is fair.

For annotate code in particular. Label the sections yourself so the answers are comparable.

Mistakes to avoid

Accepting one written form of an expression when several are equivalent. No tolerance on a measured answer. Code questions that depend on formatting. A highlight that could reasonably span more or fewer words.

How EdProcto marks it

Expressions, numbers and single-form answers are marked by rule, with tolerances and half-credit tolerances where you set them. A typed expression or chemical equation is compared sign for sign, with spacing ignored, so each form you accept is listed, and a slip that would be forgiven in a word is never forgiven here; working and code are marked by a reader against your rubric, step by step.

Questions.

How does a student answer a annotate code question?
A program, or an answer about one. Each line or section of a program explained.
How is annotate code marked?
By you, against the model answer and rubric you give, or by Procto AI when you ask it on an answer; the mark it saves is yours to keep or change.
Can Procto AI write annotate code questions?
Yes: from a chapter, notes or a handout, in this shape, at the level of thinking you set, written from your material only if you say so.