Your First Line of Code

Tell the computer what to do. In English. Almost.

1

Hello, World!

Every programmer's first program: make the computer say hello. Click Run to execute the code. Try changing the message.

2

Variables & Math

Variables store values. You can do math with them, combine them, and change them. Adjust the values and run the code.

+
3

If / Else: Making Decisions

The computer checks a condition and chooses a path. Enter a score to see if it passes or fails.

Score:
4

Loops: Repeat Actions

A loop runs code multiple times. Choose how many times to loop and see the pattern it creates.

Repeat: times
Fun Fact

The first computer bug was a real bug: a moth trapped in a relay of the Harvard Mark II computer in 1947. Grace Hopper taped it into the logbook and wrote "First actual case of bug being found."

Coder!

You've written real code that a computer can execute. Variables store data, if/else makes decisions, loops repeat actions. Every app, game, and website is built from these same building blocks.

0
Commands Run
0
Time Exploring

Code Is Instructions

A program is a list of instructions the computer follows in order. Each line tells it to do one thing: store a value, do math, make a decision, or repeat.

Variables Store Data

A variable is a named box that holds a value. name = "Alice" stores text. age = 14 stores a number. You can change the value anytime.

If/Else Makes Decisions

if (score > 60) { print("Pass") } else { print("Fail") }. The computer checks the condition and chooses a path. This is the foundation of all logic.

Loops Repeat

for (i = 0; i < 10; i++) { ... } runs the code inside 10 times. Without loops, you would have to write the same line thousands of times.

Ready to Create?

Put your new knowledge into practice!

More Discoveries

Suggest a Correction