Authoring free-text input questions
This page provides two examples of free-text input questions.
- Manually graded example.
- Free-text input where the final answer is extracted to an algebraic input.
1. Simple manually graded question
The simplest use is to capture students' typed text. In this respect the free-text input, and linked [[ascii]] block, are very like an essay or short answer input.
Start with a blank STACK question, and choose a name.
Question variables should be changed to
ta1:"## Theorem: ∀ n ∈ ℕ, 1+3+5+7+...+(2n−1) = n².
Let P(n) be the statement `sum_(k=1)^n 2k − 1 = n²` ∀ n ∈ ℕ.
Since `sum_(k=1)^1 =1 =1^2`, we see that \(P(1)\) is true.
Assume that \(P(n)\) is true. Then
`
sum_(k=1)^(n+1) (2k−1) = sum_(k=1)^(n) (2k−1)+ (2(n+1)−1)
= n² + 2n + 1
= (n+1)².
`
Since `P(1)` is true and `P(n+1)` follows from `P(n)`, we conclude
that `P(n)` is true `forall n in NN` by the principle of mathematical induction";
Notice this text contains a mix of markdown and unicode text.
The question text uses pure LaTeX rather than unicode:
<p>Prove that \(\forall n \in \mathbb{N}\), \(1+3+5+7+...+(2n−1) = n^2\)</p>
<div class="free-text-container">
[[input:ans1]]
[[validation:ans1]]
[[ascii input="ans1"]]
[[/ascii]]
</div>
Note the use of style `
...