Read code

Read a program; answer what it does.

As the student meets it, replayed

What does this function return for n = 5?

  • 3
  • 5
  • 8
  • 13
Marked on the server
The facts
Category
Specialised input. Maths, code, music, chemistry.
The student gives
One option
Marked
By rule, at once
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 read code.

Why this shape

Read a program and say what it does: comprehension of code, which precedes writing it and which hiring tests too rarely check.

An example. What does this function return when called with 5?

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 read code in particular. Ask for the output, the bug or the purpose, one per question.

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 read code question?
One option. Read a program; answer what it does.
How is read code marked?
By rule, the moment the answer is given: the mark needs no reader.
Can Procto AI write read 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.