NmMwZDJhYzJlNTFhM2VhYTQyNjhkZGE5MmJjMGNiMjBiYzE0NGM4YmE3OGJkOTVjMjJhMzJkYWJmM2U4MGIzZg.msfhcyta.eyJ1cmwiOiIvcGwvY291cnNlX2luc3RhbmNlLzIvaW5zdGFuY2VfcXVlc3Rpb24vMTc2LyIsImF1dGhuX3VzZXJfaWQiOiIxIn0
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.23. Examples from element documentation

Examples below are taken from the documentation page for PrairieLearn Elements in question.html .


Submission Elements


pl-multiple-choice
Example of a multiple choice element.

Correct Input: negative

pl-checkbox
Example of a multiple selection element.

Correct Input: A-B, B-C, and D-E.

Checkbox options
Select all possible options that apply.
pl-number-input
Example of a fill in the blank element that accepts numeric values.

Correct Input: 1.339713339197286

$x =$

Correct Input: 1.34

$x =$
pl-integer-input
Example of a fill in the blank element that accepts integer values.

Correct Input: 42

$y =$
pl-symbolic-input
Example of a fill in the blank element that accepts mathematical expression values.

Correct Input: x + y + 1

$z =$
pl-string-input
Example of a fill in the blank element that accepts string values.

Correct Input: Learn

Prairie
pl-matrix-component-input
Example of a fill in the blank element that provides input fields for each entry of a matrix.

Correct Input:

  • 1 in location 1x1
  • 2 in location 1x2
  • 3 in location 2x1
  • 4 in location 2x2
pl-matrix-input
Example of a fill in the blank element that provides an input field for supplying the underlying code required to create the matrix.

Correct Input:

  • MATLAB: [1 2; 3 4]
  • Python: [[1, 2], [3, 4]]
pl-file-editor
Example of an inbrowser code file editor submission element.
fib.py
Editor Settings
pl-file-upload
Example of a file submission element.

Correct Input: foo.py, bar.c, and filename with, comma.txt

Files

Decorative Elements


pl-code

Example of embedding code blocks with syntax highlighting.

1
2
def square(x):
    return x * x
pl-figure

Example of displaying an image in a question.

pl-file-download

Example of providing a file download option.

data.txt
pl-variable-output

Example of displaying matrices using a code export.

  • Matlab/Octave
  • Mathematica
  • NumPy
  • R
  • SymPy
1
2
C = [5.000 6.000; 7.000 8.000];
D = [-1.000 4.000; 3.000 2.000];
1
2
Cm = {{5, 6}, {7, 8}};
Dm = {{-1,  4}, { 3,  2}};
1
2
3
4
import numpy as np

C = np.array([[5, 6], [7, 8]])
D = np.array([[-1,  4], [ 3,  2]])
1
2
C = matrix(c(5, 6, 7, 8), nrow = 2, ncol = 2, byrow = TRUE)
D = matrix(c(-1,  4,  3,  2), nrow = 2, ncol = 2, byrow = TRUE)
1
2
3
4
from sympy import *

C = Matrix([[5, 6], [7, 8]])
D = Matrix([[-1,  4], [ 3,  2]])
pl-matrix-latex

Example of displaying a matrix using latex.

$C = \begin{bmatrix} 5 & 6\\ 7 & 8\\\end{bmatrix}$
pl-graph

Example of a graphviz visualization.

G A A B B A->B

Example of a graphviz visualization.

A A A->A 0.28 B B A->B 0.09 C C A->C 0.63 B->A 0.40 B->B 0.23 B->C 0.37 C->A 0.35 C->B 0.45 C->C 0.20
pl-python-variable

Displaying contents of a Python dictionary.

1
{'a': 1, 'b': 2, 'c': 3}
pl-dataframe

Displaying contents of a Pandas DataFrame from Python.

  col1 col2
0 1 3
1 2 4

2 rows x 2 columns

pl-overlay

What is the length of the hypotenuse?

$$3$$
$$3$$
Additional attempts available with new variants

Correct answer

Collection 4

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

Question C4.23

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/codeDocumentation
Title:
Examples from element documentation

Variant

Started at:
2026-08-04 16:37:23 (CDT)
Duration:
0s
Show/Hide answer
{
  "c": 4.242640687119285,
  "acc": {
    "key": "a",
    "html": "negative",
    "score": 1,
    "feedback": null
  },
  "vpos": [
    {
      "key": "b",
      "html": "A-B",
      "feedback": null
    },
    {
      "key": "d",
      "html": "D-E",
      "feedback": null
    },
    {
      "key": "f",
      "html": "B-C",
      "feedback": null
    }
  ],
  "ans_sig": 1.34,
  "matrixA": {
    "_type": "ndarray",
    "_dtype": "int64",
    "_value": [
      [
        1,
        2
      ],
      [
        3,
        4
      ]
    ]
  },
  "matrixB": {
    "_type": "ndarray",
    "_dtype": "int64",
    "_value": [
      [
        1,
        2
      ],
      [
        3,
        4
      ]
    ]
  },
  "ans_rtol": 1.339713339197286,
  "int_value": 42,
  "string_value": "Learn",
  "symbolic_math": {
    "_type": "sympy",
    "_value": "x + y + 1",
    "_variables": [
      "x",
      "y"
    ],
    "_assumptions": {
      "x": {
        "commutative": true
      },
      "y": {
        "commutative": true
      }
    },
    "_custom_functions": []
  }
}

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.