Learn to Code ยท zero-dependency ยท MIT

larzkata

Coding exercises with instant feedback.

A tiny autograder for learning to code: define an exercise (prompt, test cases, hint), check a learner's function, and get a clear pass/fail with the failing case and a nudge. Handles exceptions safely and tracks progress across a set.

larzscript pkg install kata
View on GitHub →Learn the stack

What you get

Try it

import "kata" as kata
let ex = kata.exercise("double", fn(n) { return n * 2 }, [
  {"args": [3], "expected": 6}, {"args": [5], "expected": 10}
], "double(n) should return n * 2")
let result = kata.check(ex, fn(n) { return n * 2 })
print(result["passed"], result["total"])
let broken = kata.check(ex, fn(n) { return n + 2 })
print(broken["passed"], broken["total"], broken["hint"])
Output
2 2
0 2 double(n) should return n * 2

Why it's in the Larz Stack

larzkata is a real Larzscript package (larzscript pkg install kata) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.