Skip to content

Variables

Declare a variable with the equals symbol =.

Notes Calculator
Calculation example
CalculationResult
discount = 10%10%
cost = 200€200
cost - discount€180

A variable can be a single word or an entire phrase (i.e. red apples = 10).

A variable can be redefined by giving it a new value.

The most recently defined value will be used on subsequent lines.

Notes Calculator
Calculation example
CalculationResult
amount = 50€50
amount x 2€100
amount = 20€20
amount x 2€40