# pylint: disable=missing-module-docstring
from pywebexercises.exercises import mcq, longmcq, torf
Exercises
This page demonstrates the functionality available in pywebexercises
:
- Multiple choice questions (MCQs).
- Long MCQs.
- True or false questions.
- Checked sections.
First, you need to have followed the set-up instructions in the “Setup” page.
Then, import the exercise functions we are going to use…
Important: When using these functions, set #| echo: false
to prevent the code from showing in your document.
MCQ
The mcq()
function will produce a drop-down box.
This was generated by running:
mcq({'1': 0,
'3': 0,
'8': 1,
'200': 0
})
LongMCQ
The longmcq()
function will produce radio buttons.
This was generated by running:
longmcq({'1': 0,
'3': 0,
'8': 1,
'200': 0
})
True or false
The torf()
function can be used to create a drop-down with options of True or False.
That was generated by running:
False) torf(
Checked sections
These are created by making a webex-check
section, which will add a button that will only display feedback when pressed.
You can also include .webex-box
to draw a box around the section.
:::{.webex-check .webex-box}
# Question/s here
:::
For example…
Using webex-check
and webex-box
What is a baby dog called?
What is a baby sheep called?
Just using webex-check
What is a baby dog called?
What is a baby sheep called?
Just using webex-box
What is a baby dog called?