Skip to main content

Define Variables

Naming your data with variables can greatly improve the readability of notebooks by adding a layer of abstraction.

Declaration

To declare a variable, use the = operator:

Variables can contain letters from a to z, both upper and lower case. They cannot contain spaces or special characters, except for numbers, underscores ("_"), or emojis.

Referencing

You can reference variables in calculation blocks like this:

Redefinition

Variables that have already been declared cannot be redefined:

A simple solution is to declare a new variable:

Constants

The language supports some constants by default, such as π (pi) and e (Euler's number).