POLYTONE — the AI-native programming language

Guide

Control flow

if/elif/else, while, and for over lists and sets — colon blocks, four-space indentation, Bool conditions only.

flow.pt
fn main() -> Void:
    mut total = 0
    for n in [1, 2, 3, 4, 5]:
        if n % 2 == 0:
            continue
        total = total + n
    while total < 20:
        total = total * 2
    print("{total}")