2.1 Algorithms Flashcards
Decomposition
breaking a complex problem down into smaller problems and solving each one individually
Abstraction
picking out the important bits of information from the problem, ignoring the specific details that don’t matter
Algorithmic Thinking
a logical way/set of instructions to solve a problem -> as an algorithm
What do computer systems do?
Input -> process -> output
Flowcharts
Visually represent an algorithm
Flowchart: Arrow
Connects boxes
Shows flow of data through program
Flowchart: Rectangle
Process
General instructions, processes and calculations
Flowchart: Parallelogram
Input/output
Flowchart: Diamond
Decision -> YES or NO
Flowchart: Curved cornered rectangle
Terminal -> Start/Stop
Flowchart: rectangle with lines
Sub program - refers to other flowcharts
Pseudocode
Shows the outline of an algorithm without worrying about fine details (syntax)
Trace Tables
Give a simple way of testing a piece of code is working correctly
What do columns in trace tables represent?
Variables
What do rows in trace tables represent?
Values that the variable can take at a particular point in an algorithm