Tekst
Source
Documentation/Basicssource tree
Learn

Basics

Tekst keeps everyday code small: values are assigned directly, blocks are indentation-based, and the syntax stays close to readable pseudocode.

Indentation

Blocks end with a colon and are defined by indentation. Keep indentation consistent inside a block.

indentation.tk
if ready:
    print("go")
    print("now")

Values

The native compiler supports integers, floating-point numbers, booleans, strings, None, lists, tuples, and dictionaries.

values.tk
count = 42
ratio = 3.14
active = true
name = "Tekst"
empty = None
numbers = [1, 2, 3]
pair = (10, 20)
user = {"name": "Ayaan"}

Variables and assignment

Variables are introduced by assignment. Assignment can also update an existing value with operators such as +=.

assignment.tk
score = 10
score += 5
print(score)

Operators

CategoryOperators
Arithmetic+ - * / %
Comparison== != < <= > >=
Logicaland or

Strings

Strings use double quotes. Basic interpolation can insert a variable by placing its name inside braces.

strings.tk
name = "Tekst"
print("Running {name}")

Input and conversion

input.tk
age = int(input("Age: "))
print(age)
print(str(age))
print(float(age))
print(bool(age))

Comments

Comments are not part of the native compiler documentation yet, so examples in the official guide intentionally avoid relying on a comment syntax.