write a source assignment¶
Writing an assignment is done by writing a Jupyter notebook and using tags:
Write a question¶
markdown cells in Jupyter to write your question.
Write an answer¶
code cell write the code snippet that is the answer to the
### BEGIN SOLUTION <code> ### END SOLUTION
### BEGIN SOLUTION and
### END SOLUTION delimiters are
necessary. It is possible to pass your own set of delimiters to
(see further documentation for that).
answer:<uique_label> tag to the cell.
Write a check¶
code cell write
assert statements to check specific
elements of the answer:
assert <condition>, <error message>
<condition> is not meet the
<error message> will be
written to the feedback on a submission.
Note that it is possible to refer to the output of a previous cell using
score:<integer> tag to the cell. The
<integer> is the
value associated with this specific check. If the
<condition> is met
<integer> value will be added to the total score of a student.
Optionally, you can also add the
description:<string> tag to the cell.
This will add the
<string> to the feedback for that specific check. Note
that spaces should be replaced with
- which will automatically be
replaced in the feedback. For example:
### Correct answer in the feedback.
Note that it is possible to write multiple checks for a given answer. This can be done so as to programmatically offer varying levels of feedback for specific parts of the task.