Using the CodeHS Code Editor

The Code Editor is where you will go to write your programs! There are three columns with a right section, center section and left section.

You can write code, run code, check code, reset their code, change font size, view assignment details, access help documents, correspond with teachers and share your program.

From a student view you can go to the Code Editor to view exercise, write code, run student code, test cases, view assignment, view help documents and view grade.

Under 'MORE', you can see see code history, share links, view lesson slides, print code, and download programs.

Change Font Size

You can change the font size in the code editor to make sure it shows the right size for you. First click the settings icon on any editor page in the center section. Then on the next screen you can click the + or - button to change the font size that shows up in the editor and click done. That's it!

View Documents in Code Editor

If you are on any editor page on CodeHS, we provide a handy "Docs" tab to give you a quick reference to information you may need to finish your program including formulas, functions, commands, and more. To find the docs, just click the "Docs" tab on the right side of the screen.

View Grades:

You can view your grades directly from the Grade Tab, see how many points the assignment is worth, and check status of assignment (i.e. Not Submitted or Submitted).

Ask Your Teacher a Question

For help on a specific exercise, you can ask your teacher by clicking More> Conversation and sending a message.

View Code History

The Code History tab is a way for teachers and students to see all of the changes and revisions that have been made to a certain program, and allows you to revert a program to any previously saved version. It is accessible on any exercise page under the "MORE" tab in the top right corner.

The History tab is a great tool to aid in cheat detection, as teachers can assume that exercises (particularly more complex exercises) that are solved in very few code runs/saves are often attributable to borrowed or copied code.

Actions that cause an entry to be created in the History tab:

  1. You run code

  2. You click save

  3. You paste text in the editor

  4. It's been a minute and none of things have happened but the code has changed

Share Your Program

You can share your program by clicking More>Share. You can then click the “Create Share Link” button, and right away, you will have a link to send to others for them to run your program.

An option on the Share Tab is whether the share link is “Active.” If you change you mind about sharing your program and don’t want other people to be able to visit the share link, you can toggle the “Active” switch to Off. As the author, you will still be able to view that shared program page, but no one else can.

Print Your Code

You can print your code by clicking More>Print. After you click the blue Print button, a new page will open up, nicely formatted for printing and pop up a dialog to print it out.

Download Your Code

You can download your code by clicking More>Download as ZipFile or txtFile.

Managing Files

Some program types allow you to use create and use multiple files in your program. Read more about managing multi-file programs here.

Did this answer your question?