Learn Kotlin from your first println() to a small project, with every exercise checked as you go.
8 lessons, 16 exercises. Runs Kotlin 2.4.
Not started
Hello, output
Print text with println() and print(), write comments, and see where a Kotlin program starts running.
Values and variables
Store values with val and var, meet Kotlin's basic types, and name constants with const val.
Reading input and arithmetic
Read lines from standard input with readln(), turn text into numbers, and calculate with Kotlin's operators.
Making decisions
Choose what your program does with if, else and when, using comparisons and the boolean operators &&, || and !.
Loops
Repeat work with for loops over ranges, while loops that run until a condition changes, and break and continue for early exits.
Functions
Package code into named functions with parameters and return values, use default and named arguments, and understand scope.
Collections
Store many values in lists, sets and maps, choose between read-only and mutable versions, and loop over them.
Strings and a small project
Slice, search and reshape text with Kotlin's string functions, then combine everything so far into a shopping receipt program.
Your progress is saved in this browser. Sign in to keep it on every device.