## Definition To assign an initial value to a [[variable]]. *Verb. Noun form: initialisation.* > We initialise the variable `total` to zero before the loop begins, so we have something to add to. ## Characteristics - The first time a variable is assigned a value; - does not imply the value cannot change later; - the moment a variable comes into existence in languages without a separate [[declare|declaration]] step (e.g., Python); and - can happen after declaration or at the point of declaration. ## Examples ### Initialising a variable (Python) ```python x = 5 # x initialised with value 5 ``` ### Initialising a variable after declaration (C) ```C int x; // declaration x = 5; // initialisation ``` ### Initialising a variable at the point of declaration (C) ```C int x = 5; ``` ## Non-examples ### Declaring a variable (C) ```C int x; // not initialisation as x has no value yet ``` ### Declaring a variable (JavaScript) ```javascript let x; ``` ### Reassigning a variable (Python) ```python x = 5 # initialisation x = 10 # reassignment ``` ### Instantiating a `Person` object (Python) ```python r = Person("Rory") # instantiation ``` ### Instantiating a `Person` object (Java) ```java Person f = new Person("Fife"); // instantiation ```