CoedHS
Home / Courses

Courses

Pick a short exercise and work at your own pace. JavaScript examples can run in the sandbox.

SHORT LESSON

Creative coding

Write a greeting with a variable

const name = "Alex";
console.log("Hello, " + name + "!");

Change the name. Add a second line that introduces your favorite hobby.

Open sandbox →
SHORT LESSON

Art with code

Draw a pattern with text

for (let row = 1; row <= 5; row++) {
  console.log("*".repeat(row));
}

Change the symbol and the number of rows. Can you print the pattern backwards?

Open sandbox →
SHORT LESSON

Digital foundations

Keep information organized

const file = {name: "first-project", type: "text", saved: true};
console.log(file.name);

Add a description to this object and print it.

Open sandbox →
SHORT LESSON

Introduction to Python

Meet variables and loops

name = "Alex"
for number in range(1, 4):
    print(name, number)

Read the program line by line. Python examples are reading exercises here; the sandbox runs JavaScript.

Open sandbox →
SHORT LESSON

Web design

Put a page together

<h1>My first page</h1>
<p>Something I made myself.</p>

Sketch a page with a heading, an image, and three links. Label each part with the HTML element it needs.

Open sandbox →
SHORT LESSON

Programming fundamentals

Turn a task into a function

function double(value) { return value * 2; }
console.log(double(7));

Create a second function that adds five. Try several inputs.

Open sandbox →
SHORT LESSON

AP computer science

Trace a small algorithm

const values = [8, 3, 12, 4];
let total = 0;
for (const value of values) total += value;
console.log(total / values.length);

Track total after each loop. Explain what the last line calculates.

Open sandbox →
SHORT LESSON

JavaScript projects

Work with a list

const ideas = ["quiz", "drawing", "timer"];
ideas.forEach((idea, i) => console.log(i + 1, idea));

Add your own project ideas. Then print only the first one.

Open sandbox →
SHORT LESSON

Cybersecurity foundations

Check an input

const label = "My project";
console.log(label.length > 0 && label.length <= 40);

Try an empty label and a long label. Explain why checking input is useful.

Open sandbox →