Writing Skeleton Code

Appropriate skeleton code makes coding easier for students. To help students start coding more easily, you can write appropriate skeleton code in the code editor.

Writing Skeleton Code

  1. Click the pencil-shaped edit icon on the left navigation bar.

  2. In the 'Write Practice Problems' tab in the upper right corner, select the main.* file from the practice file list.

  3. Write appropriate skeleton code to assist students in writing code.

  4. Set the skeleton files that you want to show to students by default when they access the practice page.

  5. Click the 'Save' button in the lower right corner to save the code you wrote.

  6. To check the written code, click the 'Reset' icon in the upper right corner of the code pane.

pageSetting up the basic skeleton file

Adding and Deleting Code Files

You can add and delete various code files, not just the main.* file, in which you write skeleton code.

Adding Code Files

  1. Click the pencil-shaped edit icon on the left navigation bar.

  2. In the 'Write Practice Problems' tab, click the '+' icon at the top of the file list.

  3. Set the name and extension of the newly created code file. Example: model.py, model.R

  4. Click the 'Save' button in the lower right corner.

There is sample code written in main.*.

Deleting Code Files

  1. Click the pencil-shaped edit icon on the left navigation bar.

  2. In the 'Write Practice Problems' tab, click the more(:) button on the right side of the file you want to delete.

  3. Click Delete among the options that appear after clicking the more button.

  4. Click the 'Save' button in the lower right corner.

Checking the Modified Code

If you modify the main.* part of a programming problem you saved, you need to reset the code in order for the changes to be reflected in the editor. Click the code reset icon in the upper right corner of the editor to reset the code.

After resetting, you can still see the code you wrote before the reset in the code editor by clicking more(:) icon -> edit history in the upper right corner.

Last updated