paper 2 section 7 Flashcards
Trace Tables
Used to show what happens to variables during a program
Syntax Error
An error in the grammar of the program - the code will not run
name=rina
print(name)
Merge Sort
Splits the data into individuals and then sorts and continuously re-pairs it
Logic Error
An error where the code runs, but produces an unexpected result/incorrect output
name=”rina”
print(“name”)
Linear Search
Goes through each number one by one, until the required value is found
Doesn’t need an ordered list, however it’s much slower than binary searching
Insertion Sort
Takes one piece of data and places it in the correct position in a new list
Flowchart Symbols
rectangle = square
paralellogram = input/output
diamond = decision
square in square = sub program
circle square = terminal
Decomposition
Breaking down a complex problem into smaller, manageable parts which are easier to solve.
Bubble Sort
Go through the array, comparing each number to the one next to it, if it’s bigger swap it.
After the first round the last number is in the right place
Repeat this for the other numbers. Each time reducing the number of comparisons by 1
Binary Search
Ordered list is halved and depending on the value of the middle item, it will search the lower or higher half of the list
Useful and fast for large lists, but the list has to be ordered for it to work
Algorithmic Thinking
The consideration that goes into how to solve a problem using one or more algorithms.
Abstraction
Identifying the key parts of a problem and hiding those that aren’t important so that it becomes easier to solve.