YzZjMzQ4MmRkMTE4YzVlN2QyZmEyMDhlZWM1OWZiM2Q0NTIxNTM0YmQ0ZDQ3NzU3MmY1YjA3NTc0Mzk1ZmQyMw.msfhb7kk.eyJ1cmwiOiIvcGwvY291cnNlX2luc3RhbmNlLzIvaW5zdGFuY2VfcXVlc3Rpb24vMTg5LyIsImF1dGhuX3VzZXJfaWQiOiIxIn0
Skip to main content Accessibility guide
PrairieLearn Go home
  • XC 101, SectionA
  • Assessments
  • Gradebook
  • C4
Load from disk
  • Dev User student
    View type
    ✓ Staff view staff ✓ Student view student ✓ Student view without access restrictions student
    Effective user
    Customize…
    Course Requests Settings Log out

Regenerate assessment instance

Warning: Regenerating the assessment instance will select a new set of questions from this assessment. Any progress on the current assessment instance will be lost.

Are you sure you want to regenerate the assessment instance?

Course staff: Regenerate your assessment instance to pick up changes to the assessment or to get a fresh set of questions.

C4.12. 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 11.

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 = 2 + 9$

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 = 2 + 9$

$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 = 2 + 9$

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 = 2 + 9$

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 = D_{16} + 18_{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 36d0bd31a2d44599.

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.

Additional attempts available with new variants

Correct answer

Collection 4

Assessment overview
Total points: 0/360
Score:
0%

Question C4.12

Value: 2
All variants: Open (current)
Total points: — /10
Auto-graded question

This form is only for reporting errors in the question itself. Do not use this form if you just don't know how to answer the question.

Previous question Next question

 Personal Notes

No attached notes

Attached files will be saved here for your reference. These files act as personal notes and can be used for your own review purposes. They are not used for grading.

Max file size: 10 MB

Attached personal notes will be saved here for your reference. These notes can be used for your own review purposes. They are not used for grading.

Staff information

Student details

Dev User
dev@example.com

Question

QID:
element/integerInput
Title:
Element pl-integer-input: Input of integers

Variant

Started at:
2026-08-04 16:38:13 (CDT)
Duration:
0s
Show/Hide answer
{
  "c_1": 11,
  "c_2": 11,
  "c_4": "11",
  "c_5": "11",
  "c_6": "0",
  "c_np": {
    "_type": "np_scalar",
    "_value": "16",
    "_concrete_type": "int64"
  },
  "c_7_b2": 37,
  "c_7_b16": 37,
  "c_large": "36d0bd31a2d44599",
  "c_6_blank": ""
}

Assessment instance

Assessment:
gallery/elements
Started at:
2026-08-04 16:37:17 (CDT)
Duration:
0s
View log
This box is not visible to students.