2.1 Elements of Computational Thinking Flashcards

1
Q

What is abstraction?

A

The removal of unnecessary data and excess details from a problem to allow us to focus on solving the core problem - that only consists of the key features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the abstraction methods?

A

Abstraction by Generalisation.
Data Abstraction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is abstraction by generalisation?

A

Grouping similar problems together so that they can be tackled together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is data abstraction?

A

Not thinking about where data is stored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the need for abstraction?

A

Allows for more efficient design during software development as you focus on the points that need to be built rather than the unnecessary details.
This makes programming quicker and easier as there is less to code.
It also prevents the program from getting unnecessarily large.
This means that hardware is used better and it makes better use of available processing resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does abstraction relate to reality?

A

Abstraction is a simplified representation of reality. Real-world entities may be replaced with computational structures such as tables and databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When abstracting a problem what must first be identified?

A

The problem that must be solved - so that it isn’t removed by accident.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is involved with thinking ahead?

A

Inputs.
Outputs.
Preconditions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why do you need to identify inputs and outputs?

A

Means that there is no ambiguity in what is needed and what isn’t.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are preconditions?

A

Requirements that must be met prior to the program being executed. If the preconditions are not met the program will fail, or return an invalid answer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you use preconditions to your benifit?

A

Means that you do not have to carry out unnecessary checks. Preconditions can be checked before a sub-procedure to ensure that they run correctly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is re-usable code?

A

Well defined and documented procedures that can be used in multiple programs or multiple times within the same program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the benefit of reusable code?

A

Easier to debug and maintain the programs as they will be shorter.
Less debugging needed as the sections are already checked.
Saves money of writing and testing functions.

Means that some complex parts of the program don’t have to be remade every time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can reusable code be implemented?

A

Added to a library and imported when needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is caching?

A

The temporary storage of data and instructions in cache memory so that they can be used again.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is stored in cache?

A

The last few instructions of a program.
Results of earlier computations of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why is cache used?

A

So that the instructions and data can be accessed and retrieved quickly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is web caching?

A

Storing HTML pages and images that have been recently retrieved so that the page can be loaded quicker if opened soon after.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is CPU caching?

A

Storing frequently used instructions and data within the CPU - making it quicker as you don’t have to go to RAM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are autosaving documents?

A

Documents that save as you work

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How do autosaving documents work?

A

Store data in cache so that in the event of a crash the data isn’t lost!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are the advantages of caching?

A

Faster access to cached resources.
Saves on costly bandwidth.
Reduces load on web servers on client server databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the drawbacks of caching?

A

Slower results if not found in cache as RAM will then have to be searched following the initial search of cache.
Doesn’t work when the file name changes.
You could be given an old copy of something as that is the one that has been cached.
Loss of privacy as people could see old versions of websites.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is procedural decomposition?

A

Breaking a problem down into a number of sub-problems so that each sub-problem accomplishes an identifiable task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How can procedural decomposition be aided?

A

Structure Diagrams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What are structure diagrams?

A

A top down design to show the decomposition steps.

27
Q

What does a structure diagram show?

A

The structure of a problem, its subsection and how they link to other subsections.

28
Q

How do you create a structure diagram?

A

Each sub section is divided untill it cant be any more.

29
Q

How does a structure diagram help?

A

Aids planning and design. Helps with time management, workflow and deligation to a team. Helps to identify oportunities for reusable code. Allows for planning of modules.

30
Q

What is structured programing?

A

A way to improve the clarity and quality of a program.

31
Q

What does structured programming include?

A

Modularisation
Structures code
Recursion

32
Q

What does Modularisation mean?

A

Includes functions and modules

33
Q

What does structured code mean?

A

It follows:
Sequence,
Iteration,
selection

34
Q

What does recursion mean?

A

A self calling function

35
Q

What is sequence?

A

Following the order of the program. Completing the instructions one by one - in the order that they are written. Order of the lines of code are in a logical order of executions.

36
Q

What is slelection?

A

Choosing an output or section of code to follow based on the criteria.
E.g. If statements are conditional, where a section of code is executed based on a condition.

37
Q

What is iteration?

A

Loops in the program that repeat a section of code.
e.g. for and while loops

38
Q

What does it mean to think logically?

A

Means that you identify where decisions need to be made in order to gather information about the options available to make an informed decision.

39
Q

What does thinking logically allow you to do?

A

Allows you to plan and prepare for different scenarios as it provides foresight into what decisions need to be made.

40
Q

What option is the best when making decisions?

A

The most effective, convenient and reasonable option.

41
Q

How can the decision making process be visualised?

A

Flow charts

42
Q

What shape is the terminal?

A

Oval

43
Q

what shape is the lines?

A

A line (duh)

44
Q

What shape is a process?

A

Rectangle

45
Q

What shape is a subroutine?

A

Rectangle with an internal square

46
Q

What shape is a decision?

A

diamond

47
Q

What shape is an input/output?

A

Rhombus

48
Q

What is the purpose of the terminal?

A

Used to start and stop a flowchart. Also used to declare a sub-routine

49
Q

What is the purpose of a line/connector?

A

Join shapes together. It is directed so has an arrow head to show the direction of flow

50
Q

What is the purpose of a process?

A

Used when something computational has to happen.
e.g.
timer
declaring/modifying variables
arithmatic

51
Q

What is the purpose of a subroutine?

A

Acts like a function. A section of code that can be repeated (called) whenever required

52
Q

What is the purpose of a decision?

A

When a decision is made. It is Boolean - yes or no - so can only have two lines coming out of it. - only shape with two lines

53
Q

What is the purpose of input and output?

A

To check for an input signal or define a given output

54
Q

What is the oval name?

A

Terminal

55
Q

What is the line name?

A

Connector/line

56
Q

What is the rectangle name?

A

Process

57
Q

What is the rectangle with an internal square called?

A

Sub routine

58
Q

What is the diamond name?

A

Decision

59
Q

What is the rhombus called?

A

Input and output

60
Q

What does it mean to think concurrently?

A

Completing more than one task at the same time

61
Q

What does concurrent processing mean?

A

Different tasks are given slices of processor time. The process can be divided into multiple sets of operations called threads that run at the same time but the processor switches between these threads/processes to give the illusion that they are happening at the same time.

62
Q

What is parallel processing?

A

When one task is assigned to one core. Multiple cores means that processes can happen simultaneously.

63
Q

What are the benefits of concurrent processing?

A

The number of tasks that can be completed in a set time is increased.
Less time is wasted waiting for inputs or other processes to be executed.

64
Q

What are the drawbacks of concurrent processing?

A

Can take longer when a large number of tasks need to be completed but can’t be done all at once.
Takes time to coordinate and switch between processes - reducing program throughput.
Not all tasks can suit concurrent processing