ZDU0YWU2MGU4NGY1ZGU5MWNhNWQ3NWQyN2ZiZGZkMmQ3ODRiNDcwNDVlZjkyN2E0MzcyZjFiNDg2Y2RlZTA0Yw.msfhb40m.eyJ1cmwiOiIvcGwvY291cnNlX2luc3RhbmNlLzIvaW5zdGFuY2VfcXVlc3Rpb24vMjA4LyIsImF1dGhuX3VzZXJfaWQiOiIxIn0
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.13. Element pl-symbolic-input: Input of symbolic answers

An example in which complex numbers are not allowed (allow-complex="false")

Suppose $$y = a x + b.$$ Assuming that $a \neq 0$, solve for $x$.

The attribute initial-value pre-fills the input the first time it is rendered so students can begin from a suggested expression.

$x=$
An example in which complex numbers are allowed (allow-complex="true")

Write an expression for the complex number $z$ whose argument is $a$ (in radians) and whose modulus is $m$.

$z=$
An example in which the correct answer is specified as a string in server.py

Write an expression for the current $I$ in a resistor if the voltage is $V$ and the resistance is $R$.

$I=$
An example in which we specify a different imaginary unit for display (imaginary-unit-for-display="j")

Write an expression for the complex number $c$ whose real part is $a$ and whose imaginary part is $b$.

$c=$
An example in which we specify the use of ln rather than log for display (display-log-as-ln="true")

Write an expression for the derivative of $ln(x)*x$.

$\dfrac{d}{dx} ln(x)*x =$
An example that uses the formula editor input

Submit $\displaystyle {\rm test}\left(\sqrt{\frac{e^x}{x^2}}\right)$

$y = $
An example that uses the formula editor with an initial value

Suppose $$y = a x + b.$$ Assuming that $a \neq 0$, solve for $x$.

The initial-value attribute works with the formula editor. The sympy expression is automatically converted to LaTeX for the editor display.

$x=$ \frac{- b + y}{a}
An example in which we disable the display of simplified student submissions (display-simplified-expression="false")

Write the expression $sin(atan(x))$.

Note that this expression will be simplified to $\frac{x}{\sqrt{x^2+1}}$ if display-simplified-expression is not disabled.

$y =$
An example in which we change display attributes

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. The attribute placeholder can be used to set the placeholder text. This box below has size=5 instead of the default size=35.

Write an expression for the first derivative of $\frac{1}{2} x^2$.

$\dfrac{d}{dx} \frac{1}{2}x^2 =$
An example in which we allow a blank answer

The allow-blank attribute allows an expression to be left blank by the user and still be considered valid. By default a blank expression is equivalent to the expression 0, unless the blank-value is used. The placeholder attribute allows setting custom placeholder text.

Simplify the expression $x^2+x+1$, or leave it blank if the expression cannot be simplified further.

An example in which a blank answer is the only correct answer

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

Find a value for $x \in \mathbb{R}$ so that $x^2 = -1$. If there is no solution, leave the answer blank.

An example where we use assumptions

Sometimes, certain expressions can only be treated as equivalent by sympy if additional assumptions are made. For example, consider that $\sqrt{B^2} = B$ is only true if $B \geq 0$. To use these, assumptions must be set in the server.py file when variables are declared.

Submit an expression equivalent to $\sqrt{B^2}$ when assuming $B > 0$.

Another example where we use assumptions

Simplify $|C|$ assuming that $C \leq 0$.

An example in which trig functions are not allowed (allow-trig-functions="false")

What is the value of $\cos(\pi) * x$?

$\cos(\pi) * x = $
Example using custom functions

Submit $f(x) + beef(\alpha)$, where $\alpha$ should be spelled out as alpha in the submission.

Another example with custom functions

Submit $beef(y) + the(y)$. We set show-score="false" to hide the score badge and suffix="$= \text{where?}$" to set the suffix.

$= \text{where?}$
An example with nested absolute value expressions

This example demonstrates handling of nested absolute value expressions. Submit the expression $|x+|-x+1+2+3+4||$.

Note: This tests the symbolic input's ability to handle complex nested absolute value expressions with multiple terms.

$y =$
An example that times-out.

This demonstrates a submission for which sympy takes an indeterminate amount of time to solve, when the answer is wrong.

Submit below $\exp(sin(n)) \cdot (1+ sin(n)^2)^{125}$. The actual answer is $\exp(\sin(n))*(1 + \sin(n)^{10})^{5}$, but the submission will timeout.



An example in which interval notation is allowed (allow-sets="true")

Consider $f(x) = x^{-2} - 4$. Using intervals and set unions, find $\{ x | f(x) \leq 0 \}$.

Correct answer: $ (-\infty, -1/2] \cup [1/2, \infty) $
An example in which set notation is allowed (allow-sets="true")

For which values of $\theta \in [0, 2\pi)$ does $\sin(\theta) = \cos(\theta)$? Express your answer as a set.

Correct answer: $\{\pi/4, 5\pi/4\}$ $\theta \in$
Another example of set notation

Set theory defines numerals inductively: $0 = \{ \}$, and $n + 1 = \{ 0, 1, ..., n \}$ where each number is written in set-numeral form. What is the set numeral for 2? (Don't use any numbers!)

Correct answer: $\left\{ \{\}, \left\{ \{\} \right\} \right\}$ $2 =$
Additional attempts available with new variants

Correct answer

Collection 4

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

Question C4.13

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/symbolicInput
Title:
Element pl-symbolic-input: Input of symbolic answers

Variant

Started at:
2026-08-04 16:37:46 (CDT)
Duration:
0s
Show/Hide answer
{
  "I": "V / R",
  "c": {
    "_type": "sympy",
    "_value": "_ImaginaryUnit*b + a",
    "_variables": [
      "b",
      "a"
    ],
    "_assumptions": {
      "a": {
        "commutative": true
      },
      "b": {
        "commutative": true
      }
    },
    "_custom_functions": []
  },
  "x": {
    "_type": "sympy",
    "_value": "(-b + y)/a",
    "_variables": [
      "b",
      "a",
      "y"
    ],
    "_assumptions": {
      "a": {
        "commutative": true
      },
      "b": {
        "commutative": true
      },
      "y": {
        "commutative": true
      }
    },
    "_custom_functions": []
  },
  "z": {
    "_type": "sympy",
    "_value": "m*(_ImaginaryUnit*sin(a) + cos(a))",
    "_variables": [
      "m",
      "a"
    ],
    "_assumptions": {
      "a": {
        "commutative": true
      },
      "m": {
        "commutative": true
      }
    },
    "_custom_functions": []
  },
  "dx": "x",
  "lnx": {
    "_type": "sympy",
    "_value": "log(x) + 1",
    "_variables": [
      "x"
    ],
    "_assumptions": {
      "x": {
        "commutative": true
      }
    },
    "_custom_functions": []
  },
  "no_trig": "-x",
  "timeout": "exp(sin(n))*(1 + sin(n)**10)**5",
  "simplify": {
    "_type": "sympy",
    "_value": "x**2 + x + 1",
    "_variables": [
      "x"
    ],
    "_assumptions": {
      "x": {
        "commutative": true
      }
    },
    "_custom_functions": []
  },
  "nested_abs": {
    "_type": "sympy",
    "_value": "Abs(x + Abs(x - 10))",
    "_variables": [
      "x"
    ],
    "_assumptions": {
      "x": {
        "commutative": true
      }
    },
    "_custom_functions": []
  },
  "nosimplify": "sin(atan(x))",
  "assumptions": {
    "_type": "sympy",
    "_value": "B",
    "_variables": [
      "B"
    ],
    "_assumptions": {
      "B": {
        "real": true,
        "zero": false,
        "finite": true,
        "complex": true,
        "nonzero": true,
        "infinite": false,
        "negative": false,
        "positive": true,
        "hermitian": true,
        "imaginary": false,
        "commutative": true,
        "nonnegative": true,
        "nonpositive": false,
        "extended_real": true,
        "extended_nonzero": true,
        "extended_negative": false,
        "extended_positive": true,
        "extended_nonnegative": true,
        "extended_nonpositive": false
      }
    },
    "_custom_functions": []
  },
  "set_notation": "{pi/4, 5pi/4}",
  "set_numerals": "{ {}, { {} } }",
  "assumptions_2": {
    "_type": "sympy",
    "_value": "-C",
    "_variables": [
      "C"
    ],
    "_assumptions": {
      "C": {
        "real": true,
        "prime": false,
        "finite": true,
        "complex": true,
        "infinite": false,
        "positive": false,
        "composite": false,
        "hermitian": true,
        "imaginary": false,
        "commutative": true,
        "nonpositive": true,
        "extended_real": true,
        "extended_positive": false,
        "extended_nonpositive": true
      }
    },
    "_custom_functions": []
  },
  "formula_editor": {
    "_type": "sympy",
    "_value": "test(sqrt(_Exp1**x/x**2))",
    "_variables": [
      "x"
    ],
    "_assumptions": {
      "x": {
        "commutative": true
      }
    },
    "_custom_functions": [
      "test"
    ]
  },
  "simplify_blank": "",
  "custom_function": "f(x) + beef(alpha)",
  "custom_function_2": {
    "_type": "sympy",
    "_value": "beef(y) + the(y)",
    "_variables": [
      "y"
    ],
    "_assumptions": {
      "y": {
        "commutative": true
      }
    },
    "_custom_functions": [
      "beef",
      "the"
    ]
  },
  "interval_notation": "(-infty, -1/2] U [1/2, infty)",
  "formula_editor_initial": {
    "_type": "sympy",
    "_value": "(-b + y)/a",
    "_variables": [
      "b",
      "a",
      "y"
    ],
    "_assumptions": {
      "a": {
        "commutative": true
      },
      "b": {
        "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.