questions.yaml
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
-
ref: solar-system-jupiter
type: radio
text: Which one is the largest planet?
options:
- Jupiter
- Mercury
- Mars
# optional, default is 0, True, True
correct: 0
shuffle: True
discount: True
hint: Just don't choose the wrong ones
# ---------------------------------------------------------------------------
-
ref: solar-system-mars
type: checkbox
text: Which ones are correct?
options:
- $1 > 0$
- $-1 > 1$
- $\sqrt{3} > \sqrt{2}$
- $0 = 0$
correct: [1, -1, 1, 0.5]
# optional
discount: True
hint: There are three.
# ---------------------------------------------------------------------------
-
ref: question-v1
type: text
text: What's your favorite basic color?
correct: ['blue', 'green']
hint: It's not red.
# ---------------------------------------------------------------------------
-
ref: question-v2
type: text_regex
text: What's my favorite basic color?
correct: '[bB]lue'
hint: It's not red.
# ---------------------------------------------------------------------------
-
ref: question-colors
type: textarea
text: Write names of the three basic colors.
correct: correct-question.py
hint: They start by RGB and order does not matter.
# ---------------------------------------------------------------------------
-
ref: question-whatever
type: generator
script: generate-question.py
arg: "11,120"
# the script should print a question in yaml format like the ones above.
# Print only the dictionary, not the list (hiffen).
# ---------------------------------------------------------------------------
-
ref: one-question
type: information
text: Please do not cheat.
# ---------------------------------------------------------------------------
-
ref: another-question
# type: information (default)
text: |
The text of questions is parsed as __markdown__ and can include
LaTeX formulas $\sqrt{2\pi}$ and pretty code
```.C
int main() {
return 0;
}
```