Programming is giving step-by-step instructions to a computer. Like a recipe for a robot โ it follows your orders exactly!
Click a command to instruction the robot:
You just programmed a robot! Every button is an instruction.
A variable is like a labeled box in the computer's memory. Give it a name, store a value โ then use it anytime!
๐ Click a value chip, then click a box to store it!
Every piece of data has a type. The type tells the computer what kind of info it's handling. Click each type to explore!
Operators are symbols that perform actions on data โ like a calculator but way more powerful! Click to see them in action.
A compiler or interpreter translates your human-readable code into instructions the machine understands โ like a real-time translator!
Translates ALL code at once before running (C, Java, Go)
Reads & runs code line by line (Python, JavaScript, Ruby)
Programs make decisions! Like a fork in the road โ if something is true, take one path; otherwise, take another.
Check condition
Else-if (chain)
Otherwise
Why write the same thing 100 times when a loop does it for you? Loops repeat actions automatically โ like a merry-go-round!
Repeat a fixed number of times
Repeat while condition is True
A function is like a vending machine โ put something in (input), get something useful out (output). Define it once, use it forever!
Pick an input to feed the machine:
Variables inside the function (x is a parameter)
What the function sends back as its output
A class is a blueprint โ like a cookie cutter. You use it to stamp out many objects, each with the same structure but different data!
def speak(self): print(self.sound)
An algorithm is a step-by-step recipe to solve a problem. Every program is built on algorithms โ from Google Search to your phone's GPS!
Algorithm: Make a Cup of Tea โ
Data the algorithm starts with
Steps to transform the data
Result the algorithm produces
A bug is a mistake in code. Debugging is the detective work of finding and fixing it. Every programmer debugs โ it's a superpower, not a failure!
Can you spot the bug? Click the broken line to fix it!
Typo or wrong grammar (missing colon, bracket)
Code runs but gives wrong answer
Crashes while running (divide by zero, etc.)
Master the vocabulary every programmer uses daily. Click the card to flip and reveal the definition!
You've learned so much! Let's put it to the test. Answer 10 questions and see your score!
Pick a language and get your first code running! All languages share the same core concepts โ just different syntax.
python.org
print("Hello, World!")name = "Alice" age = 20 is_happy = True
if age >= 18:
print("Adult")
else:
print("Minor")for i in range(5):
print(i)def greet(name):
return "Hi, " + name
print(greet("Bob"))fruits = ["apple","banana"]
fruits.append("cherry")
print(fruits[0]) # appleperson = {
"name": "Alice",
"age": 20
}
print(person["name"])class Dog:
def __init__(self, name):
self.name = name
def bark(self):
print("Woof!")
d = Dog("Rex")
d.bark()console.log("Hello, World!");let name = "Alice"; const age = 20; let isHappy = true;
if (age >= 18) {
console.log("Adult");
} else {
console.log("Minor");
}for (let i = 0; i < 5; i++) {
console.log(i);
}function greet(name) {
return "Hi, " + name;
}
console.log(greet("Bob"));let fruits = ["apple","banana"];
fruits.push("cherry");
console.log(fruits[0]); // applelet person = {
name: "Alice",
age: 20
};
console.log(person.name);class Dog {
constructor(name) {
this.name = name;
}
bark() { console.log("Woof!"); }
}
let d = new Dog("Rex");
d.bark();oracle.com
public class Main {
public static void main(String[] args) {
System.out.println("Hello!");
}
}String name = "Alice"; int age = 20; boolean happy = true;
if (age >= 18) {
System.out.println("Adult");
} else {
System.out.println("Minor");
}for (int i = 0; i < 5; i++) {
System.out.println(i);
}static String greet(String n) {
return "Hi, " + n;
}ArrayList<String> list =
new ArrayList<>();
list.add("apple");
System.out.println(list.get(0));class Dog {
String name;
Dog(String n) { name = n; }
void bark() {
System.out.println("Woof!");
}
}// Java is strongly typed! // Every variable needs a type: int x = 5; // int double y = 3.14; // decimal String s = "hi"; // text
#include <iostream>
using namespace std;
int main() {
cout << "Hello!" << endl;
return 0;
}string name = "Alice"; int age = 20; bool happy = true; double pi = 3.14;
if (age >= 18) {
cout << "Adult";
} else {
cout << "Minor";
}for (int i = 0; i < 5; i++) {
cout << i << endl;
}string greet(string n) {
return "Hi, " + n;
}
cout << greet("Bob");vector<string> fruits;
fruits.push_back("apple");
cout << fruits[0];class Dog {
public:
string name;
void bark() {
cout << "Woof!";
}
};// Compile then run! // Every program needs main() // Return 0 = success
You've learned every foundational concept in programming. Every app, game & website is built with these ideas. Now go build something amazing!