Please enable JavaScript.
Coggle requires JavaScript to display documents.
9.1 Computational Thinking - Coggle Diagram
9.1 Computational Thinking
Decomposition
Definition
Breaking complex problems into smaller, more manageable parts so it is easier to solve
Pattern Recognition
Definition:
Finding the similarities or patterns in problems. Spotting patterns in code allows the program to run more efficiently.
Flow Charts
Programming
Variables
A memory location within a computer program where values are stored.
Iteration
Doing the same instruction over and over again.
Indefinite Loop
We use a While Loop if we want to repeat some code until a condition is met,
The example shown below will repeat until the number is no longer less than 5, so in this case it will output the numbers 0,1,2,3,4.
Definite Loop
We use a For Loop if we want to repeat some code a certain number of times.
The example shown below will repeat the code 5 times, in this case it will output “Hello World” 5 times.
Sequenced
Algorithms
Searching algorithms.
Linear Search
This search starts with the first item and then moves to each item in turn, until either a match is found or it reaches the end of the data with no match found. The list does not have to be in order.
Binary Search
This is a faster method for searching for an item that is in an ordered list. A binary search algorithm takes the data and keeps dividing it in half until it finds the item it is looking for.
Abstraction
Definition
Taking away unneeded information to leave only the necessary things to solve the problem
Selection
Nested If Statement
Using a nested if statement allows you to see if something else is true if the first condition is met.
Subroutines
A section of code written outside of the main program. The umbrella term for procedures and functions.
A procedure is a subroutine that performs a specific task
The same as a procedure
But it returns a result back to the
main program