# Write and run code

A Code workspace lets you edit and run Python, JavaScript or TypeScript in your browser.

## Open a workspace

Ask the tutor for a coding exercise, then open **Code** in the Session pane. Choose **Open as page** for more room. If the workspace comes with a reading, it opens beside the editor. A file marked **Read-only** can be read and imported, like any library your exercise provides.

To work on your own, open **Materials** and select a workspace under **Practice**. Opening it from the list starts a fresh copy. To continue your edits, return to the same page: reloading it keeps your work.

## Run your changes

Edit a file and click **Run**. Prints and errors appear under **Output**. A TypeScript type error stops the program before it runs; click the reported location to jump to that line and fix it. **Stop** ends a running program. **Reset** replaces your edits with the starter files.

When the workspace offers **Run tests**, use it to check your changes against the exercise's tests.

## Answer a coding problem

Edit your answer in the practice set or reading. If **Run tests** is available, you can check your work before you submit. Some checks run only when you choose **Submit answer**: a test can check what the code does, and a rubric can judge how you wrote it. When the exercise shares the details, use the results and hints to see what passed and what needs work. **Your answer** in the finished practice set shows the code you submitted.