What is computational thinking?
The ability to think logically about a problem and apply techniques for solving it.
What are some methods of problem solving?
Simulation,
Enumeration – list all cases,
Trial and error,
Theoretical approach,
Creative solution.
What is simulation?
The process of designing a model of a real system in order to understand the behaviour of the system, and to evaluate various strategies for its operation.
What is ennumeration?
Listing all possible answers to a problem.
What is decrease/divide and conquer?
A strategy for algorithm design focused on finding a solution to a sequence of smaller, related problems until the instance is small enough to be solved directly.
What is structured programming?
Structured programming is a method of writing a computer program which uses:
- Top-down analysis for problem-solving,
- Modularisation for program structure and organisation,
- Structured code for the individual modules.
What is structured code?
Code which follows the following characteristics:
- Sequence: Ordered statements or subroutines executed in sequence,
- Selection: One of a number of statements is executed depending on the state of the program, typically using if/then/else constructs,
- Iteration: A statement or block is executed repeatedly until a certain condition is met, using constructs like while, for, or do/until.
What is modularisation?
Splitting a program into various modules which have various functions and can be reused.
What is top-down design?
Looking at the goal of a program, and splitting that up repeatedly into differing tasks, each being its own module and performing a single function.
What are the benefits of structured programming?
What are some examples of good programming practice?
What are some problems solved by algorithms?
What are the properties of a good algorithm?
A good algorithm:
- has clear and precisely stated steps that produce the correct output for any set of valid inputs,
- should allow for invalid inputs,
- must always terminate at some point,
- should execute efficiently, in as few steps as possible,
- should be designed in such a way that other people will be able to understand it and modify it if necessary.
What is bubble sort?
A simple sorting algorithm which works by passing through a list repeatedly, and swapping items around when the former is larger than the latter.
What is merge sort?
A complex sorting algorithm which works by splitting a list into multiple sublists each containing one individual item, and then merging these sublists, placing the items in order as the lists are merged.
What is linear search?
A simple searching algorithm which passes through each item in a list in order and checks each one for what it is looking for, stopping when it finds what it is looking for or when the list ends.
What is binary search?
A complex searching algorithm which requires a sorted list. It examines the middle item, sees whether it is smaller or larger than the desired value, and discards the side which the value is not on. This repeats until the value is found or there is no more list to search.
What is the purpose of testing?
The purpose of testing software is to reveal errors.
What are the typical stages of testing?
The typical stages of testing are:
- Module testing: make sure each subroutine works correctly,
- Program testing: make sure each program in the system works correctly,
System testing: make sure the whole system works as expected, and does what the original specification required.
What is normal data?
The data that would typically appear in a programs typical use.
What is boundary data?
The data that could work with the program, but is on the limits of what should work and likely won’t appear in typical use.
What is erroneous data?
The data which will not work with a program and will cause an error.
What is hand-tracing?
Going through a program manually and figuring out what each step will do.
What is a trace table?
A table used to write down the contents of each variable as it changes during execution.