Learn to code
Code
Write real code and see it run — HTML, CSS, Python, Java, C, SQL, LaTeX, and Linux — with nothing to install.
10 coursesHTML/CSS · Python · Java · C · SQL · LaTeX · LinuxRuns in your browser
Python Basics
Your very first steps in programming — no experience needed.
15 Lessons
Python Basics
Your very first steps in programming — no experience needed.
A short history of Python
Start lesson
What Python is used for
Start lesson
Where to learn more
Start lesson
Set up your computer
Start lesson
Your first program
Start lesson
Variables
Start lesson
Numbers & operators
Start lesson
Getting input
Start lesson
Working with strings
Start lesson
Making decisions
Start lesson
Counting loops
Start lesson
While loops
Start lesson
Lists (1-D arrays)
Start lesson
Functions
Start lesson
Scope & arguments
Start lesson
Dictionaries (records)
Start lesson
Planning & pseudocode
Start lesson
Errors & testing
Start lesson
Putting it all together
Start lesson
Where to learn more
- freeCodeCamp — Learn Python Free, hands-on Python certification
- PyChallenger Learn Python by solving bite-size challenges
- CodeCombat Learn to code by playing a real game
- Official Python Tutorial The clear, free, step-by-step intro from python.org
- Python for Everybody (free course) A beloved beginner course by Dr. Chuck
- Visual Studio Code The free editor for writing Python on your own computer
- A-Level Computer Science (this site) Take Python further, toward the Cambridge exam
- AP CS Principles (this site) The big ideas of computing, in Python
Python for A-Level CS
Data structures, algorithms, and OOP for Cambridge 9618.
15 Lessons
Python for A-Level CS
Data structures, algorithms, and OOP for Cambridge 9618.
Nested loops & 2-D lists
Start lesson
Text files
Start lesson
Exceptions
Start lesson
Stacks
Start lesson
Queues
Start lesson
Linked lists
Start lesson
Searching
Start lesson
Sorting
Start lesson
Recursion
Start lesson
Classes & objects
Start lesson
Inheritance & encapsulation
Start lesson
Programming paradigms
Start lesson
Hash tables
Start lesson
Binary search trees
Start lesson
Graphs
Start lesson
Databases & SQL
Query, design, and change relational databases — right in your browser, no setup.
17 Lessons
Databases & SQL
Query, design, and change relational databases — right in your browser, no setup.
A short history of SQL
Start lesson
What SQL is used for
Start lesson
Where to learn more
Start lesson
Set up your computer
Start lesson
Databases and SELECT
Start lesson
Choosing columns
Start lesson
Filtering with WHERE
Start lesson
AND, OR, NOT
Start lesson
Sorting with ORDER BY
Start lesson
Counting and averaging
Start lesson
LIKE, IN and BETWEEN
Start lesson
Grouping with GROUP BY
Start lesson
Tables, keys and relationships
Start lesson
INNER JOIN
Start lesson
Joins with grouping
Start lesson
Creating tables
Start lesson
Changing the schema
Start lesson
Inserting rows
Start lesson
Updating rows
Start lesson
Deleting rows
Start lesson
Normalisation
Start lesson
Where to learn more
- SQLBolt Learn SQL step by step with interactive exercises
- SQLZoo Practice real queries on real tables in your browser
- Mode SQL Tutorial A friendly, hands-on tutorial from basic to advanced
- W3Schools SQL Short, clear pages for every SQL keyword
- PostgreSQL Tutorial A thorough guide using a popular database
- SQLite documentation The official docs for the database this course uses
- A-Level Computer Science (this site) Includes a unit on databases and SQL
Python for AP CS Principles
Big ideas of computing — data, algorithms, the Internet, and impact.
15 Lessons
Python for AP CS Principles
Big ideas of computing — data, algorithms, the Internet, and impact.
What computing is
Start lesson
Bits and binary
Start lesson
Data compression
Start lesson
Variables and expressions
Start lesson
Lists and data abstraction
Start lesson
Selection
Start lesson
Iteration
Start lesson
Procedures and abstraction
Start lesson
Algorithms: searching
Start lesson
Randomness and simulation
Start lesson
Algorithmic efficiency
Start lesson
The Internet and how data travels
Start lesson
Parallel and distributed computing
Start lesson
Impact of computing
Start lesson
The Create Performance Task (guided)
Start lesson
Java for AP CS A
Java programming for the AP Computer Science A exam.
19 Lessons
Java for AP CS A
Java programming for the AP Computer Science A exam.
A short history of Java
Start lesson
What Java is used for
Start lesson
Where to learn more
Start lesson
Set up your computer
Start lesson
Java basics: classes, main, and output
Start lesson
Using objects: String, Math, and wrappers
Start lesson
Booleans and selection: if/else and logic
Start lesson
Loops: while, for, and accumulation
Start lesson
Strings and nested loops
Start lesson
Writing a class: fields, constructor, methods
Start lesson
Encapsulation: private fields, getters, setters
Start lesson
1-D arrays: store, index, and traverse
Start lesson
Array algorithms: max, count, search, average
Start lesson
ArrayList: a list that grows
Start lesson
ArrayList algorithms: filter and the remove bug
Start lesson
2-D arrays: working with a grid
Start lesson
Searching: linear and binary
Start lesson
Sorting: selection and insertion sort
Start lesson
Recursion: base case and recursive case
Start lesson
Text files: write and read with Scanner
Start lesson
Inheritance: extends, super, and overriding
Start lesson
Polymorphism: dynamic dispatch and toString()
Start lesson
FRQ workshop: the 4 question types
Start lesson
Where to learn more
- Exercism — Java track Free coding exercises with friendly feedback
- CodinGame Learn Java by solving fun coding games
- HackerRank — Java Short challenges, from easy to hard
- dev.java (official) The official Java site, with clear guides for learners
- The Java Tutorials Oracle's step-by-step lessons
- Visual Studio Code The free editor for writing Java on your own computer
- Java practice problems (this site) Exam-style questions to test your Java
- AP CS Principles (this site) The big ideas of computing, in Python
C Programming
From printf to pointers, memory, and data structures — compile and run in your browser.
23 Lessons
C Programming
From printf to pointers, memory, and data structures — compile and run in your browser.
A short history of C
Start lesson
What C is used for
Start lesson
Where to learn more
Start lesson
Set up your computer
Start lesson
C basics: main, printf, and functions
Start lesson
Variables, types, and arithmetic
Start lesson
Booleans and selection: if, else, switch
Start lesson
Loops: while, for, and accumulation
Start lesson
Functions, parameters, and return values
Start lesson
Nested loops and patterns
Start lesson
1-D arrays: store, index, and traverse
Start lesson
Pointers: &, *, and pass-by-pointer
Start lesson
Strings: char arrays and the null terminator
Start lesson
Array algorithms: max, count, search, average
Start lesson
2-D arrays: working with a grid
Start lesson
Searching: linear and binary
Start lesson
Sorting: bubble, selection, and insertion
Start lesson
Recursion: base case and recursive case
Start lesson
Structs and typedef: . vs ->
Start lesson
Dynamic memory: malloc, free, and realloc
Start lesson
Linked lists
Start lesson
Stacks and queues (array-backed)
Start lesson
Text files: write then read
Start lesson
Error handling with return codes
Start lesson
Bits, binary, and bitwise operators
Start lesson
Run-length encoding (compression)
Start lesson
Preprocessor, const, static, and enum
Start lesson
Where to learn more
- Learn-C.org Free, hands-on C lessons you run in the browser
- Exercism — C track Small exercises with friendly mentor feedback
- HackerRank — C Practice problems, from easy to hard
- cppreference — C The careful, free reference for every C function
- The C Programming Language (K&R) The classic book by the makers of C
- Visual Studio Code The free editor for writing C on your own computer
- C practice problems (this site) Extra C challenges to test yourself
- AP CS A (this site) Learn Java, another close cousin of C
Web Basics — HTML & CSS
Start from zero. Short steps. Build a real web page.
21 Lessons
Web Basics — HTML & CSS
Start from zero. Short steps. Build a real web page.
A short history of the web
Start lesson
What a web page is made of
Start lesson
Where to learn more
Start lesson
What you need (almost nothing)
Start lesson
Your first web page
Start lesson
Headings and paragraphs
Start lesson
Bold, italic and line breaks
Start lesson
Lists
Start lesson
Links
Start lesson
Images
Start lesson
Make it a real page
Start lesson
Comments and neat nesting
Start lesson
Tables
Start lesson
Forms
Start lesson
Boxes and sections
Start lesson
Add some style
Start lesson
Selectors — class and id
Start lesson
Colours and backgrounds
Start lesson
Styling text
Start lesson
The box model
Start lesson
Spacing — margin and padding
Start lesson
Showing and hiding (display)
Start lesson
Width and centering
Start lesson
Rows with Flexbox
Start lesson
Mini-project: a profile card
Start lesson
Where to learn more
- MDN — Learn web development The clear, free reference from Mozilla
- web.dev — Learn HTML A free, modern HTML course from Google
- web.dev — Learn CSS A free, modern CSS course from Google
- freeCodeCamp — Responsive Web Design Free, hands-on HTML + CSS certification
- W3Schools — HTML Tutorial Try-it-yourself examples for every tag
- Python Basics (this site) New to coding? Try Python next
LaTeX
Typeset beautiful documents and maths — write LaTeX, compile on our servers, see the PDF.
14 Lessons
LaTeX
Typeset beautiful documents and maths — write LaTeX, compile on our servers, see the PDF.
What is LaTeX?
Start lesson
Where LaTeX is used
Start lesson
Helpful resources
Start lesson
Use LaTeX on your own computer
Start lesson
01
Your first document
Start lesson
02
Sections and titles
Start lesson
03
Bold, italic and emphasis
Start lesson
04
Bulleted and numbered lists
Start lesson
05
Maths — your first formula
Start lesson
06
Fractions, roots and sums
Start lesson
07
Aligning equations
Start lesson
08
Tables
Start lesson
09
Drawing with TikZ
Start lesson
10
Labels and cross-references
Start lesson
11
Citations and bibliography
Start lesson
12
Page layout and margins
Start lesson
13
Colour and links
Start lesson
14
Capstone: a one-page report
Start lesson
Linux & the command line
Drive a computer by typing. Practise real shell commands in a safe in-browser terminal.
14 Lessons
Linux & the command line
Drive a computer by typing. Practise real shell commands in a safe in-browser terminal.
What is Linux?
Start lesson
Why learn the command line?
Start lesson
Helpful resources
Start lesson
Get a real terminal
Start lesson
01
The shell and the prompt
Start lesson
02
Moving around
Start lesson
03
Reading files
Start lesson
04
Creating and removing
Start lesson
05
Wildcards
Start lesson
06
Saving output to files
Start lesson
07
Pipes — joining commands
Start lesson
08
Searching with grep
Start lesson
09
Finding files with find
Start lesson
10
Sorting and columns
Start lesson
11
File permissions
Start lesson
12
Users and sudo
Start lesson
13
Programs and processes
Start lesson
14
Software, settings, next steps
Start lesson
Where to learn more
- explainshell Paste a command, see what every part does
- The man pages The official manual for every command
- tldr pages Short, practical examples instead of long manuals
- OverTheWire: Bandit Learn the shell by playing a hacking game
- Linux Journey A friendly, free Linux course
Cyber security
How attacks work and how to stop them — ciphers, hashing, and safe computing, hands-on.
16 Lessons
Cyber security
How attacks work and how to stop them — ciphers, hashing, and safe computing, hands-on.
What is cyber security?
Start lesson
Why it matters
Start lesson
Helpful resources
Start lesson
Nothing to install
Start lesson
01
Security, privacy and integrity
Start lesson
02
Malware
Start lesson
03
Attacks and brute force
Start lesson
04
Social engineering
Start lesson
05
Defending a system
Start lesson
06
Passwords and authentication
Start lesson
07
Storing passwords safely
Start lesson
08
Encoding is not encryption
Start lesson
09
Symmetric encryption
Start lesson
10
Asymmetric encryption
Start lesson
11
Hashing and digital signatures
Start lesson
12
HTTPS, SSL/TLS and certificates
Start lesson
13
Data integrity
Start lesson
14
SQL injection
Start lesson
15
Access control and least privilege
Start lesson
16
Ethics, law and staying safe
Start lesson
Where to learn more
- A-Level CS security handouts (this site) Topics 6 Security, 7 Ethics, 17 Encryption — exam revision
- IGCSE CS handouts (this site) Topics 2.3 Encryption and 5.3 Cyber security
- OWASP Top 10 The most common web security risks, explained
- picoCTF Learn security by solving fun challenges
- Have I Been Pwned Check if your email appeared in a data breach
Practice
Sharpen your skills with challenges from 1★ to 5★. Pick a language.
01
Print a word
★☆☆☆☆
02
Print another word
★☆☆☆☆
03
Print a sentence
★☆☆☆☆
04
Print with a !
★☆☆☆☆
05
Print two lines
★☆☆☆☆
06
Print three lines
★☆☆☆☆
07
Print a number
★☆☆☆☆
08
Print a bigger number
★☆☆☆☆
09
Add two numbers
★☆☆☆☆
10
Add bigger numbers
★☆☆☆☆
11
Subtract
★☆☆☆☆
12
Multiply
★☆☆☆☆
13
Divide
★☆☆☆☆
14
Remainder
★☆☆☆☆
15
Use a variable
★☆☆☆☆
16
A number variable
★☆☆☆☆
17
Change a variable
★☆☆☆☆
18
Add two variables
★☆☆☆☆
19
Multiply two variables
★☆☆☆☆
20
Join two words
★☆☆☆☆
21
Greet a name
★☆☆☆☆
22
Repeat text
★☆☆☆☆
23
Ask for a name
★☆☆☆☆
24
Echo a number
★☆☆☆☆
25
Your first function
★☆☆☆☆
26
Is it positive?
★☆☆☆☆
27
The bigger one
★☆☆☆☆
28
The last item
★☆☆☆☆
29
Is it even?
★☆☆☆☆
30
Sum a list
★☆☆☆☆
31
Reverse a string
★★☆☆☆
32
Count the vowels
★★☆☆☆
33
FizzBuzz
★★★☆☆
34
Letter frequencies
★★★☆☆
35
Remove duplicates
★★★☆☆
36
Second largest
★★★☆☆
37
Group anagrams
★★★★☆
38
Flatten a nested list
★★★★☆
39
RPN calculator
★★★★★
40
Run-length encoding
★★★★★
01
Print a word
★☆☆☆☆
02
Print another word
★☆☆☆☆
03
Print a sentence
★☆☆☆☆
04
Print with a !
★☆☆☆☆
05
Print two lines
★☆☆☆☆
06
Print a number
★☆☆☆☆
07
Add two numbers
★☆☆☆☆
08
Subtract
★☆☆☆☆
09
Multiply
★☆☆☆☆
10
Divide
★☆☆☆☆
11
Remainder
★☆☆☆☆
12
A number variable
★☆☆☆☆
13
A text variable
★☆☆☆☆
14
Add two variables
★☆☆☆☆
15
Your first method
★☆☆☆☆
16
Is it positive?
★☆☆☆☆
17
Cube a number
★☆☆☆☆
18
The smaller one
★☆☆☆☆
19
Square a number
★☆☆☆☆
20
Largest of three
★☆☆☆☆
21
Count the vowels
★★☆☆☆
22
Reverse the word order
★★☆☆☆
23
Palindrome check
★★★☆☆
24
Running sum
★★★☆☆
25
Most frequent character
★★★☆☆
26
Binary search
★★★☆☆
27
Factorial (mind the size)
★★★★☆
28
Count primes below n
★★★★☆
29
Roman numerals
★★★★★
30
Longest common prefix
★★★★★
01
Print a word
★☆☆☆☆
02
Print another word
★☆☆☆☆
03
Print a sentence
★☆☆☆☆
04
Print with a !
★☆☆☆☆
05
Print two lines
★☆☆☆☆
06
Print three lines
★☆☆☆☆
07
Print a number
★☆☆☆☆
08
Add two numbers
★☆☆☆☆
09
Subtract
★☆☆☆☆
10
Multiply
★☆☆☆☆
11
Remainder
★☆☆☆☆
12
A number variable
★☆☆☆☆
13
Add two variables
★☆☆☆☆
14
Multiply two variables
★☆☆☆☆
15
Your first function
★☆☆☆☆
16
Is it positive?
★☆☆☆☆
17
Cube a number
★☆☆☆☆
18
The smaller one
★☆☆☆☆
19
Square a number
★☆☆☆☆
20
Sign of a number
★☆☆☆☆
21
Largest of three
★★☆☆☆
22
Factorial
★★☆☆☆
23
Greatest common divisor
★★☆☆☆
24
Count the 1-bits
★★☆☆☆
25
Sum an array
★★★☆☆
26
Swap two values
★★★☆☆
27
String length
★★★☆☆
28
Count a character
★★★☆☆
29
Reverse in place
★★★★☆
30
Palindrome
★★★★☆
31
Bubble sort
★★★★☆
32
Points with a struct
★★★★☆
33
Binary search
★★★★★
34
Parse an integer
★★★★★