questions.yaml 2.07 KB
-
    ref: solar-system-mars
    type: radio
    text: Choose the correct answer
    options:
        - This one is correct
        - Wrong
        - Very wrong!
    # optional
    correct: 0
    shuffle: True
    discount: True
    hint: Just don't choose the wrong ones
# ---------------------------------------------------------------------------
-
    ref: solar-system-jupiter
    type: checkbox
    text: Which ones are correct?
    options:
        - Yes
        - No
        - Yes
        - Obvious one, not very important
    correct: [1, -1, 1, 0.5]
    hint:  There are three.
# ---------------------------------------------------------------------------
-
    ref: solar-system-venus
    type: text
    text: What's your favorite basic color?
    correct: ['blue', 'green']
    hint: It's not red.
# ---------------------------------------------------------------------------
-
    ref: question-v1
    type: text_regex
    text: What's your favorite basic color?
    correct: '[bB]lue'
    hint: It's not red.
# ---------------------------------------------------------------------------
-
    ref: question-v2
    type: textarea
    text: Write names of the three basic colors.
    correct: demo/correct-question.py
    hint: They start by RGB and order does not matter.
# ---------------------------------------------------------------------------
-
    ref: question-v3
    type: generator
    script: demo/generate-question.py
    # 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;
            }
            ```