Skip to main content

Create a Custom Practice Problem

Use CodeHS Practice to create and assign practice activities for your students

Written by Mike Javor
Updated over 2 weeks ago
This is a Free Feature

CodeHS Practice problems are Unit Tests activities, where students are usually asked to write a specific function or small unit of code. Unit Tests have Test Cases which pass values through the student's function and compare the outputs to the outputs when the values are passed through the exercise solution. You can make custom CodeHS Practice problems for students to complete from your Practice page or from the Create App!

See Unit Tests on CodeHS to learn about how the Test Cases work or see Using Scratchpad and Unit Tests to learn more about this activity type.

Creating a Practice Problem From Your Create Page

  1. Navigate to your Create App.

  2. Click "Create New Assignments" and choose "Practice Problem"

  3. Choose which language you would like to create the problem in--Javascript Python3, Java, C++ or C.

  4. Title your activity, select a topic, include instructions > "Save and Continue"

  5. Add the solution code > "Save and Continue"

  6. You can now add your Test Cases > "Save and Finish"

  7. Then you can choose to Preview or Assign the activity

Gif Demonstarting how to make a custom Practice Problem from the Create App

Creating a Practice Problem From Your Practice Page

  1. Navigate to My CodeHS Practice by clicking "Practice" in the left-hand navigation under "Curriculum"

    Screenshot showing how to get to the Practice Page

  2. Click on the "My Practice" tab > "Create New"

    Screenshot showing the "My Practice" tab and "Create New" Button

  3. Choose which language you would like to create the program in-- JavaScript, Python 3, Java, C++ or C. Add a title, topic, instructions and solution code to your activity. Lastly, add your Test Cases!

    Clicking on "Create New" on the Practice Problem page. A popup to create a practice problem will show up. We can now fill out the activity details.
  4. When finished, you can preview the activity or assign it directly to one of your Sections.

You can always view or edit these problems from your Practice Problems page. You can assign, edit, or delete any custom problem by clicking the three dots to the right of an problem's name:

GIf showing how to assign, edit, or delete a custom problem

Creating Practice Problems from the Practice Page:


Still have questions? Contact our team at support@codehs.com to learn more!

Did this answer your question?