Mindmap
Programming
Inhalt der Mindmap
Programming
Mathmatical operators
- Modulus (MOD) - This prints the remainder of the number
- Quotient (DIV) - This prints the number of times the number can be divided by another
- Exponential (^) - This is when a number is multiplied by itself, e.g. 2 ^ 3 is 2*2*2
Selection
- if - This is used to check if a function is true or false to decide what to do.
- else - this is used with the if function to say 'otherwise, do this'
- elif - this combines the else and if functions to essentially allow the programmer to use a second if in the same if module.
- else - this is used with the if function to say 'otherwise, do this'
- if - This is used to check if a function is true or false to decide what to do.
Booleans
- = - Equal to, != - Not equal to, > - Greater than, < - Less than
Iteration
- For - this allows you to repeat an instruction a set amount of times e.g for n = 0 to 5 print ("Helloaw") next n
- While - this allows you to repeat an instruction or sequence until a certain condition is true or false, e.g. answer = false while answer == false
There are local and global variables, loacl variables are declared within a certain indeted part of the code, global variables are applicable to the whole code so it
A constant is a a data store that is given a name and isn't changed at any point in the code, e.g CONST pi = 3.1415
Arrays
- An array is a data store that stores a set of data that is all of the same data type. e.g. Names = ["Bob", "Jim", "Annie","Ali"]
- When you make an array you declare the name of it and how long you want it to be, e.g. array Names[5]
- Arrays are numbered in order, the first data location is always 0, so "Jim" in the array Names will be 1.
- One dimensional arrays are just essentially a list of data being stored, but a two dimensional array is like a table of data. When you make a two dimensional array you give two parts, the first is like the column reference in a table and the second like rows in a table, e.g. array Test_Scores [3,5]
- You add data to an array by doing something like this example, Test_Scores [1,3] = 14. its kind of like adding data to a coordinate.
Informationen
- Beschreibung
- Mindmap am Programming, erstellt von Joe Barry am 17/05/2017.
- Erstellt von
- Joe Barry
- Aufrufe
- 1
- Bewertung