nbgrader has a concept of a solution cell. Does nbgrader solve for some of these use cases?
https://nbgrader.readthedocs.io/en/stable/contributor_guide/metadata.html
If you’re writing tests for students to write code to make pass, those assertions should fail when executing the notebook. (assert
, ipytest, nbval) Are students then expected to change the cell back to a code cell so that the code in the notebook runs?
You can also change the cell type to raw
, but that lacks syntax highlighting and also requires an annoying extra step to run all of the code in the notebook.