You are viewing this question as it will appear in the manual grading interface. Return to the normal view when you are done.

Element pl-integer-input: Input of integers

Questions below were designed to showcase the different features of pl-integer-input. The goal of pl-integer-input is to allow users to enter only integer values. That is, users are only able to enter whole numbers like -10, 0, 3, 44, and so on. The correct value of $c$ in all questions below is 6.

Within this question, you can observe the default behavior of the pl-integer-input element. In particular, the default input field has help text of "integer" as a placeholder as well as a question button.

Solve for the value of $c$ given $c = 4 + 2$

Under this variant, we opt to provide a label for pl-integer-input In addition, we've opted to add a suffix or a unit classification to the input via suffix="units". The attribute initial-value pre-fills the input box the first time it is rendered. Here the initial value is set to one of the addends rather than the correct answer, so students still need to compute the sum themselves.

Solve for the value of $c$ given $c = 4 + 2$

$c = $ units

Within this variant, the different display options for pl-integer-input on the page are displayed. Specifically, this question uses the block option (display="block") to display the input field on its own line instead of being inline with the question. Moreover, the weight for answering this question is higher than its predecessors.

Solve for the value of $c$ given $c = 4 + 2$

The size of the input box can be set with the attribute size, and the attribute show-help-text="false" removes the button for the help popup. This box below has size=5 instead of the default size=35.

Solve for the value of $c$ given $c = 4 + 2$

This question uses the blank-answer to specify a value to be used if the user leaves it blank.

Solve for the value of $c$ given $c = 0^n$ for $n = 1$ (you can leave the question blank if the value is 0).

When allow-blank="true" is set, truly empty answers are also supported by setting blank-value="" (and potentially correct-answer="").

Solve for the value of $c$ given $c = 0^n$ for $n = 1$ (you must leave the question blank if the value is 0).

The integer can also be expected to be provided in a different base.

Solve for the value of $c$ given $c = A_{16} + E_{16}$ (provide your answer in base $16$ and base $2$).

The submitted integer can also be very large. This question also changes the placeholder text by setting the placeholder attribute, and uses base 16.

Submit f6469ef678457426.

The correct answer can also be specified using certain JSON serialized integer types. The correct answer here is specified using a numpy int64. We also set show-score="False" to hide the score badge.

Submit 16.

Correct answer

6
$c = $ 6 units
6
6
0
18 11000
f6469ef678457426
16

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Element pl-integer-input: Input of integers

Variant

Started at:
2026-08-04 23:38:52 (CDT)
Duration:
0s
Show/Hide answer
{
  "c_1": 6,
  "c_2": 6,
  "c_4": "6",
  "c_5": "6",
  "c_6": "0",
  "c_np": {
    "_type": "np_scalar",
    "_value": "16",
    "_concrete_type": "int64"
  },
  "c_7_b2": 24,
  "c_7_b16": 24,
  "c_large": "f6469ef678457426",
  "c_6_blank": ""
}
History
dec frac
rad deg