Getting Started · 1.5
Basic Types
All lessons are open — jump whenever you need.
Zolo is statically typed with type inference:
| Type | Example |
|---|---|
int |
42, -7, 0 |
float |
3.14, -2.5 |
str |
"hello" |
bool |
true, false |
T? |
Optional/nullable type |
let n: int = 42
let f: float = 3.14
let s: str = "Zolo"
let b: bool = true
let maybe: str? = nilGoal: Declare variables of the 4 basic types and use them in an interpolation.
lesson-1-5.zolo
Program output
Run the code to see the output