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
Navigate to your Create app.
Click Create New Assignments and choose Practice Problem.
Choose which language you would like to create the problem in--Python3, Java, or Javascript.
Title your activity, include instructions, and the solution code.
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
Navigate to My CodeHS Practice by clicking Practice in the top banner and click the green Create New button.
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!
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!