Year 10 - Paper 2 Flashcards
Binary search
Has to have items in order. It finds the middle number, and compares it to the answer. If the middle is lower than the item, the first half of the list is removed. Repeated until found
Sorting
When we arrange the list in a certain order
Bubble sort
Compares two items in a list, swaps them if needed, this needs to go through the list multiple times.
Insertion sort
Puts items in correct place, based on already sorted items.
What’s abstraction?
Removing unnecessary detail and focusing on the important parts, this helps to simplify the problem
What’s Decomposition?
Breaking a problem into a smaller problem, which makes it easier to solve
What’s Algorithmic thinking?
The process of turning the solution of the problem into a set of clear instructions
What are inputs?
Clear pieces of data we need to give the code
What are processes?
What the computer does with this data
What are outputs?
What the computer returns to the user
What are structure diagrams?
A graphical way of representing a problem, showing the different levels of detail. They often show the functions of a program with the sub-functions branching below them.
What’s a logic error?
Does not prevent the program running, but it does not produce the expected output
What’s a syntax error?
An error that breaks the rules of the programming language, it will not run the program
What are trace tables?
When we go through the code and record what values the variables take. We can also find the output. This is a good way of looking for logic errors
What’s searching?
When we look for a specific item in a list