-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample_quizz.toml
77 lines (60 loc) · 1.4 KB
/
sample_quizz.toml
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
76
77
name = "Sample Quizz"
#####################
# Simple Question (Good answer = 1 point)
#####################
[[questions]]
question = "How much is 2+2?"
[[questions.answers]]
answer = "2"
good = false
[[questions.answers]]
answer = "4"
good = true
[[questions.answers]] # Wrong answer, "good = false" is optional
answer = "22"
#####################
# Question with a factor (Good answer = 3 points)
#####################
[[questions]]
question = """In the following code:
<pre><code>def foo(a, b):
return a + b</code></pre>
What does <code>foo(10, 12)</code> return?
"""
score_factor = 3
[[questions.answers]]
answer = "23"
[[questions.answers]]
answer = "22"
good = true
[[questions.answers]]
answer = "1234"
#####################
# Question with manually defined value per answer
#####################
[[questions]]
question = "A carrot is..."
[[questions.answers]]
answer = "a vegetable"
value = 1
[[questions.answers]]
answer = "a fruit"
value = 0
[[questions.answers]]
answer = "meat"
value = -1
#####################
# Question with maths (compatible with LaTex notation) (Thanks to MathJax)
#####################
[[questions]]
question = '''
When \(a \ne 0\), there are 2 distinct solutions to the equation \(ax^2 + bx + c = 0\) :
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$
'''
[[questions.answers]]
answer = "true"
[[questions.answers]]
answer = "false"
good = true
[[questions.answers]]
answer = "maybe"