Please enable JavaScript.
Coggle requires JavaScript to display documents.
Paper 2 - Coggle Diagram
Paper 2
Algorithms
Computational Thinking
Abstraction
Removing unnecessary information form a problem
Decompsition
Breaking problems into smaller chunks
Algorithmic Design
To identify any issues as you begin to program
Search Algorithms
Linear
You take the item that you are looking for and you compare each one until you find the one you need
Binary
The list is continual divided in to two sections until there is only one item left
Sort Algorithms
Bubble
A bubble sort repeatedly looks at pairs and If they are in the wrong order they get swapped
Insertion
Looking at each value in turn an inserting it into the list in the appropriate place
Merge
Splitting the list down into individual elements and then reconstructed into the sorted list
Flowcharts
Programming Constructs
Sequence
The order of the steps in which they need to happen
Selection
This is the way in which different routes can be created through a program
Programming Fundamentals
Variables, Constants and Data Types
Integer
A whole number
Real
A decimal number
Character
A display unit of information equivalent to one alphabetic letter or symbol
String
A group of characters
Casting
Changing the data type of a variable
Constant
A variable that cannot be changed
Variable
Storage location
Input / Output Statements
Input
String
var=input("enter a value")
Integer
var=int(input("enter a value"))
Float
var=float(input("enter a value"))
Output
Print("Hello World!")
String Manipulation
Upper
Astring.upper()
Lower
Astring.lower()
Index
Astring.index(item)
Find
Astring.find(item)
Replace
Astring.replace(old,new)
Lists and Arrays
Check if a list is empty
IsEmpty()
Add item to a list
Append(item)
Remove an item
Remove(item)
Return the length of a list
Len()
Find the postition of an item
Index(item)
Insert an item in the list
Insert(position, item)
Boolean Logic
AND
Both inputs have to be on
OR
Either of the inputs can be on
NOT
A logic inverter