Skip to content

Commit 1911423

Browse files
authored
Update Expression.md
1 parent 6419141 commit 1911423

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docs/teacher/reference/response_area_components/Expression.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ Calculates the difference between the teacher answer (ans) and the student respo
1212

1313
Compares two symbolic expressions for mathematical equivalence, using SymPy. See [SymPy](https://www.sympy.org/en/index.html.md-button) for further information.
1414

15+
## compareExpressions
16+
**Input Symbols**
17+
18+
This is a powerful feature for defining a dictionary of accepted symbols. For each symbol, you define:
19+
20+
* **Symbol:** The LaTeX-rendered symbol (e.g., `$f(x)$`).
21+
* **Code:** The machine-readable variable name (e.g., `fx`). This is what your students will type and what the evaluation function sees.
22+
* **Alternatives:** A list of other codes you want to accept for the same symbol (e.g., `f_x`, `f(x)`, `f`). This allows you to anticipate different ways students might type the same thing.
23+
* **Visibility:** A `TRUE`/`FALSE` toggle. If "Display input symbols" is enabled in the Input tab, this setting determines whether a specific symbol is shown to the student. This allows you to show students common symbols while still accepting less common or alternative ones in the background.
24+
25+
![example](screenshots/input_symbols.png)
26+
![example](screenshots/input_symbols_preview.png)
27+
28+
Tolerances can also be added. These will apply to the numerical parts of the answer (e.g. the $10$ in $10x$).
29+
30+
This is done using the `atol` and `rtol` fields under the Evaluation Function Parameters section.
31+
1532
## Component Parameters
1633

1734
### `post_response_text` (optional)
@@ -22,11 +39,11 @@ Text block to be displayed to the left of the input field. Markdown and LaTeX ar
2239

2340
Text block to be displayed to the left of the input field. Markdown and LaTeX are allowed following the usual syntax.
2441

25-
### Allow Handwrite (Experimental)
42+
### Enable Handwriting Input
2643

27-
Enables a handwriting canvas in the browser, which allows a student can use to draw their expression, rather than type using Sympy's syntax.
44+
Enables a handwriting canvas in the browser, which allows a student to draw their expression, rather than type using Sympy's syntax.
2845

29-
### Photo (Experimental)
46+
### Enable Photo Upload
3047

3148
Allows a student to upload their expression as an image, as an alternative to handwriting if the student isn't using a phone or tablet.
3249

0 commit comments

Comments
 (0)