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 week 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 Page

  • Click Create New Assignment

  • Choose Coding Exercise > Select a Karel Type Exercise

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

Add and Edit Different Karel Worlds

1. Navigate to Karel Worlds through Advanced Settings

  • Click … > edit next to your Karel assignment

  • Click on Advanced Settings (bottom left)

  • Click the Karel Word Tab

  • Click Edit Karel Worlds

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.

3. Add New Custom Worlds

  • Click Add New World button under Custom Worlds

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

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

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's 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

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

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

Add/edit worlds while previewing the assignment.

  • Go to dropdown menu with different Karel world

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

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

 

Did this answer your question?