Practice
Small implementation problems. Each one teaches one piece of the language.
Solve these in the editor on each page. Your code is judged in the browser against hidden tests, and after it is accepted the page explains what the problem was there to teach.
| Problem | Level | Teaches | After chapter |
|---|---|---|---|
| Halving game | A | var, /, %, ranges wider than 32 bits | 1 |
| Odd one out | A | count, lambdas, .items | 1 |
| Collatz length | A | while, if as an expression, max= | 1 |
| Range sums | A | domains, cuts, prefix sums | 2 |
| Longest corridor | A | grids, [Row, Col]Char, per-row state | 2 |
| Second place | A | ?Int, max=, ?? | 3 |
| Leaderboard | B | records, reading records, sort(by:) | 3 |
More problems are coming.