The Runnable Code Snippets feature allows instructors and students to compile and run code in published posts.
To configure this feature, first go to Manage Class and navigate to the Customize Q&A section.
Choose "Enable" to allow runnable code snippets, or choose "Disable" to turn this option off.
While this feature is enabled, code blocks in published posts will include a "run code snippet" button below the block:
This button opens a widget in which students and instructors can make minor changes to the code and run it to view the output:
(Please note that edits made in this widget are not saved to the post.)
After clicking "Run" in the bottom right, the code will run, displaying any output or errors in the "output" tab.
Users may also select a different language (if needed) in the bottom right.
If you have any feedback or questions regarding this feature, please let us know at email@example.com.