100% free
Learn computer science. Free, for everyone.
Study guides, runnable examples, and practice with answers. Go at your own pace, one topic at a time.
- 53 AP CS A topics
- Python and TypeScript in 25 days
- Printable PDFs
Try it
countdown(3)
public static void countdown(int n) {
if (n == 0) {
System.out.println("Liftoff!");
} else {
System.out.println(n);
countdown(n - 1);
}
}
Output
3
2
1
Liftoff!
From AP® CS A Topic 4.16: Recursion
321Liftoff!3 courses
Courses
AP® Computer Science A
Java programming: objects and methods, selection and iteration, class creation, and data collections.
- 4 units
- 53 topics
- ~48 hrs
Learn Python in 25 Days
One hour a day from installing Python to a small, tested, working program.
- 5 phases
- 25 days
- ~30 hrs
Learn TypeScript in 25 Days
One hour a day from your first line of code to a typed, tested web app.
- 5 phases
- 25 days
- ~29 hrs