Please enable JavaScript.
Coggle requires JavaScript to display documents.
Fundamentals of Programming (Datatypes (Boolean - Holds one of two values,…
Fundamentals of Programming
Types of Programming
Selection Programming
A condition to decide the path through the program and which set of instructions to execute next such as IF and ELSE
Iteration Programming
When a group of instructions are executed repeatedly until a condition is met or while a condition is true
Definite Loop (For) - A loop where you know the exact number of times you will loop the program before executing the programming code
Indefinite Loop (While) - A loop where you don't know the exact number of times you will loop the program before executing the programming code. Instead an indefinite loop executes until some condition is satisfied
Sequence Programming
When a list of instructions are carried out in order one after another
Operators
Arithmetic
Real Division (/ in both python and pseudo code)
Division but only returns integer (DIV in pseudo code but // in python
Multiplication (* in both python and pseudo code)
Division but returns remainder (MOD in pseudo code but % in python)
Subtraction (- in both python and pseudo code)
To the power of (^ in pseudo code but ** in python)
Addition (+ in both python and pseudo code)
Relational
(<= in both python and pseudo code) - Less than or equal to
(>= in both python and pseudo code) - Greater than or equal to
(> in both python and pseudo code) - Greater than
(== in python but = in pseudo code) - Equal to
(< in both python and pseudo code) - Less than
(!= in python but = with a diagonal line through it in pseudo code) - Not equal to
Logic Gates and Truth Tables
OR - True when at least one input is true
NOT - True when the input is false
AND - Only true if both inputs are true
Truth Table - Shows every circumstance for a logic gate
Datatypes
Boolean
- Holds one of two values, tends to be true or false
String
- Can hold and sequence of characters. It can hold numbers and letters
Real (Float)
- Returns the real value even with decimal places
Character
- Holds just one character
Integer
- Whole Number
Constants and Variables
Constant
A label that refers to a location of memory containing a value that can be accessed but cannot be changed any time in the program code
Variable
A label that refers to a location of memory containing a value that can be accessed or changed by a program at any time in the program code