Skip to main content
Creating a Karel Exercise

How to create a Karel activity in a Playlist and edit the starter & solution worlds.

Zach Galant avatar
Written by Zach Galant
Updated over a month ago
Banner: This is a Free feature

With CodeHS Create, you can create your very own custom exercise with Karel the Dog! You can also add and edit multiple worlds so that students will need to solve for multiple worlds in one assignment.

Create a Karel Exercise

  • Click Create to navigate to your Create App

  • Click Create New Assignment

  • Choose Coding Exercise > select a Karel Type Exercise

  • Fill in assignment details: title, description, and starter code

    Animated GIF demonstrating the process of creating a new Karel assignment

Add and Edit Different Karel Worlds

1. Navigate to Karel Worlds

  • Click the three dots "" next to your Karel assignment > then click Edit

  • Click the Karel Worlds tab

2. Edit the Default World

You'll notice that as a default, the assignment has one blank world already created. Click Edit to customize this world and create a solution world. If you only want to use one Karel world for the assignment, once you save the solution world, you're done!

Use the Add New Worlds button under Custom Worlds to add additional worlds to the assignment.

GIF demonstrating how to navigate to add or edit karel worlds

3. Add New Custom Worlds

  • Click the Add New World button under Custom Worlds

  • Name your world, adjust its size, Karel's start position and orientation

  • Add and remove balls and walls by clicking the Add/Remove button, then clicking on the map

    Gif demonstration on how to add new custom Karel worlds

4. Add a Solution

NOTE: Make sure to adjust all the settings for a world before creating a solution. If you make any changes to a world after creating a solution, you will need to delete the old solution and create a new one.

  • Click Add Solution (click only when there are no more changes you'd like to make!)

  • Change the location of tennis ball(s) and Karel to show the solution you want achieved. Note: you will not be able to change world size or walls.

  • Click Save

  • Click Back to Worlds

Gif demonstration of how to add a solution to a Karel world

5. Publish the Custom World

This is an essential step. This attaches this world to the assignment as a Public world. You must publish a world, otherwise, students will not be able to view or access it inside the assignment. Select a world and click Edit > Publish:

Gif demonstration on how to publish a custom Karel world.

More Information on Using Custom Worlds

Public vs Custom Worlds:

  • Students will only see and interact with public worlds.

  • Make sure to click Publish as the last step or else students will not see the world in their assignment.

  • Students will have the ability to create their own custom world inside the assignment, but they cannot edit any of the other worlds or make their world public. This can be used for creative Karel exercises, where students are tasked with designing their own world.

Add/edit worlds while previewing the assignment

  • Go to the dropdown menu with different Karel worlds

  • Select Add/Edit worlds at the bottom of the menu

Screenshot of the Run code tab in a Karel exercise showing the Add/Edit Worlds option.

Note: you will see all of your custom worlds in your preview of the assignment even if they are not published. However, students will only see published worlds.

Add and Edit a Custom Autograder

Creating an autograder allows you to add your own test cases to your custom Karel assignment which will be used to check whether students have completed your custom assignment correctly and helps make the assignment more personalized.

Navigate to Custom Autograder

  1. Click the three dots "" next to your Karel assignment > then click Edit

  2. Scroll down > click Custom Autograder Edit

GIF demonstrating how to navigate and create a custom autograder for a custom karel exercise.

Video Demo


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

Did this answer your question?