All Collections
Autograders
Creating Autograders
Create a Custom Practice Problem
Create a Custom Practice Problem

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

Gary Gould avatar
Written by Gary Gould
Updated over a week 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 page!

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 page.

  2. Click Create New Assignments and choose Practice Problem.

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

  4. Title your activity, include instructions, and the solution code.

  5. You can now add your Test Cases!

Creating a Practice Problem in Javascript:

Creating a Practice Problem in Python 3:

Creating a Practice Problem in Java:


Creating a Practice Problem From Your Practice Page

  1. Navigate to My CodeHS Practice by clicking Practice in the top banner and click the green Create New button.

  2. Choose which language you would like to create the program in-- JavaScript, Python 3, or Java. Add a title, 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.
  3. 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:

Creating Practice Problems from the Practice Page:

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

Did this answer your question?