FC Topic 1 - Computational Thinking
FC Topic 1 - Computational Thinking
Thinking
SLR7 - Basic programming techniques
SLR8 - Advanced programming techniques
SLR10 - Algorithm and Logic
Decomposition and Abstraction
Decompositions - breaking down larger problems into smaller
subproblems, so they can be easier to solve.
2) Define abstraction
You might be given a scenario, where you have to use abstraction. Identify for
the examiner the necessary information you need to solve the problem and what
information is unnecessary. (possible 6 marks)
Subprogram - Function and Procedures
Subprogram - Carries out a specific task within a larger program.
Benefits of subprogram
1) Improving the readability of code (make it easier to read and understand)
2) Making it easier to test/debug
3) Once written you can reuse the same code many times
4) Easier to work on in teams. (each person work on specific subprogram)
5) Makes the logic clearer.
6) Reducing the time needed to develop a solution,
Exam Questions
1) What is a subprogram?
Paper 1 theory - The examiner may give you a flow chart and ask you to interpret
it. For example give you some input and ask you what will be the output.
Pseudocode
An informal written description of a solution that uses imprecise English language
statements. Use for planning and developing your programs
e.g.
If password incorrect
Otherwise
Constant - A value that does not change while the program is running and is assigned when the
program is designed.
Array - An array is similar to a list, but items THEY DO (HOMOGENEOUS) have to be of the same data type
Record - You can store multiple item in a list, THEY DO NOT (HETEROGENEOUS) have to be of the same data type
Exam Questions
Q2) Identify a data structure that allows data of different types to be stored?
Operators you must know
Exam Questions
Must understand BIDMAS rules
Brackets,
Indices,
Division,
Multiplication,
Addition,
Subtraction
Trace Tables
● Runtime - Produces an error during runtime, due to missing file (cannot read
or write to a file)
Or illegal calculation (dividing by zero)
Causes program to crash while runing
Exam Questions
3 4 8 10 34 55 66
34 55 66
66
3/2 = 2
Linear Search - 66
3 4 8 10 34 55 66
Exam Questions
Q1) In a binary search, what condition must be meet before it can be carried out?
60 5 25 55 1 10
5 25 55 60 1 10
Merge Sort
25 55 60
1 5 10 25 55 60
Merge Sort
25 55 60
1 5 10 25 55 60
Exam Questions
A B X A B X
0 0 0 0 0 0 0 0
1 0 1 0 1 0 1 1
2 1 0 0 2 1 0 1
3 1 1 1 3 1 1 1
S M S AND M
0 0 0
0 1 0
1 0 0
1 1 1
Exam Questions
Complete the truth table for this circuit