Writing Skeleton Code
Proper skeleton code makes it easier for students to code. By preparing appropriate skeleton code in advance, students can easily start writing code in the code editor.
Writing Skeleton Code
- Click the pencil icon in the left navigation bar to modify materials.
- In the upper right corner, select the 'Create Practice Problem' tab and choose the main.* file from the list of practice files.
- Write appropriate skeleton code to assist students in writing their code.
- Set up the skeleton files that you want students to see by default when they access the practice page.
- Click the 'Save' button in the bottom right corner to save the code you wrote.
- To check the code you wrote, click the 'Reset' icon in the upper right corner of the code window.
Adding and Deleting Code Files
You can add and delete various code files as well as the main.* file where the skeleton code is written.
Adding Code Files
- Click the pencil icon in the left navigation bar to modify materials.
- In the upper right 'Create Practice Problem' tab, click the '+' icon at the top of the file list.
- Set the name and extension of the newly created code file. Example: model.py, model.R
- Click the 'Save' button in the bottom right corner.
The main.* file contains sample code.
Deleting Code Files
- Click the pencil icon in the left navigation bar to modify materials.
- In the 'Create Practice Problem' tab, click the More(:) button on the right side of the file you wish to delete.
- From the options that appear after clicking the More button, click Delete.
- Click the 'Save' button in the bottom right corner.
Confirming the Changes Made to the Code
If you modify the main.* part of a programming problem that has been saved and save it again, you need to reset the code in order for the changes to reflect in the editor. Click the code reset icon in the upper right corner of the editor to reset the code.
Even after resetting, you can check the code written before the reset in the upper right corner of the editor by clicking More(:) icon -> Revision History
.