ODM2MWUxYjcyOGQ1ZTRkNGNiZjM4ZmE2MzcxNTQyMWIzNjAwNThiNmRiNDZlNmNlMmFjNWEzYjFkZjg5NzUyNQ.msfhb8dh.eyJ1cmwiOiIvcGwvY291cnNlX2luc3RhbmNlLzIvaW5zdGFuY2VfcXVlc3Rpb24vMTk3LyIsImF1dGhuX3VzZXJfaWQiOiIxIn0
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.3. Element pl-number-input: Input of real and complex numbers

Questions below were designed to showcase the different features of pl-number-input. The goal of pl-number-input is to allow users to enter real or complex values to be checked within a specific tolerance. The correct value of $c$ in all questions below is 2.8284271247461903.

Within this question, you can observe the default behavior of the pl-number-input element. In particular, the default input field has help text as a placeholder as well as a question button and is set to use "relabs" to check the tolerance, which is a combination of relative ("rtol") and absolute ("atol") tolerances.

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

This question modifies the default relative tolerance (of 1e-3) and absolute tolerance (of 1e-8) underneath pl-number-input element. Furthermore, we add a label to the front of the input field to specify what the field should receive. 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 given values rather than the correct answer, so students still need to compute the result themselves.

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

$c = $

Under this variant, we opt to change the default comparison of pl-number-input from relative and absolute tolerances (comparison="relabs") to significant digits (comparison="sigfig"), which has a default of two digits. In addition, we've opted to add a suffix or a unit classification to the input via suffix="units".

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

$c = $ units

Another option is to set the comparison for pl-number-input to decimal digits ("decdig") with a requirement for four digits (digits="4"). Furthermore, we changed the weight of this question to be more impactful vs the previous entries via weight="2". Lastly, we allow students to enter complex numbers by setting allow-complex="true".

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

$c = $ units

As another example, we remove the help popup box found in pl-number-input by setting show-help-text="false".

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

$c = $ units

This example shows the use of the attribute size to control the width of the input box. Enter below the coefficients for a function $y = a x + b$ that has a slope equal to $2$ and intercepts the $y$-axis at $5$. Here we also use placeholder="" for both input boxes and show-help-text="false" for the first input box.

$f = $ $ x \, +$

This example allows the user to provide a blank value as a valid response. It uses the allow-blank="true" and blank-value="" options.

One of the roots of $c^2 = 0$ is $c=0$. Is there another root? Keep blank if there is no other root.

$c = $

If allow-blank="true" is set, blank-value can also be set to any other accepted input value, such as blank-value="1" below.

What is the greatest common divisor of 7 and 9? If the answer is 1, you can keep it blank.

$c = $

This question modifies the default format used to print the correct answer and submitted answer. This option can be used, for example, to set the number of decimal places, force (or avoid) scientific notation, or to include a sign in the result. We also set show-score="False" to hide the score badge.

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

Additional attempts available with new variants

Correct answer

Collection 4

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

Question C4.3

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/numberInput
Title:
Element pl-number-input: Input of real and complex numbers

Variant

Started at:
2026-08-04 16:38:00 (CDT)
Duration:
0s
Show/Hide answer
{
  "c_1": 2.8284271247461903,
  "c_2": 2.8284271247461903,
  "c_3": 2.8284271247461903,
  "c_4": 2.8284271247461903,
  "c_5": 2.8284271247461903,
  "c_6": "",
  "c_7": 2.8284271247461903,
  "c_b": 5,
  "c_m": 2,
  "c_6_blank": 1
}

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.