Computaitional Thinking 2.1 Flashcards

1
Q

What is abstraction?

A

Abstraction is the process of removing unnecessary detail to create a representation of reality.

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

What is prefetching?

A

Technique where Instructions are fetched based on algorithms, which predict what instructions are likely to soon be used, predicts what data will be needed next and loads data into cache before it is needed.

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

State two advantages of using abstraction.

A
  1. Saves time and resources
  2. Removes unnecessary complexity.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the purpose of thinking ahead?

A

To make programs easy and intuitive for users to use.

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

What is a computer system

A

Any system in which data can be inputted, processed, and outputted.

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

Define input

A

Any data that is entered or received by a computer

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

State three types of inputs

A

Keyboard, mouse, touch screen, microphones

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

Define output

A

The results are passed back once the input has been processed.

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

State three types of outputs

A

Monitor, printer, speaker, projector

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 before a program can be executed.

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

State one example of a precondition.

A
  1. Queues - check that the queue is not full before adding another item
  2. root function - check that the number is not negative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Where can a precondition be defined?

A

Before the code is executed e.g before a loop

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

Define caching

A

Storing instructions or values in cache memory after they have been used, as they may be used again.

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

State an advantage of caching

A
  1. Cache memory is faster than main memory
  2. It stores data for temporary use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How is caching used in storing web pages?

A

Web pages that are often visited are cached, so the next time a web page is visited it will be loaded without delay

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

Give a limitation of caching

A
  1. Effectiveness of algorithm in managing the cache
  2. Size of the cache
  3. expensive
17
Q

Give an advantage of using reusable program components

A
  1. Since you do not have to create it from scratch, it will save time money, and resources.
  2. More reliable than coding from the start since it has already been tested
  3. Removes repeated code(saves memory, increases performance of program)
18
Q

Give two examples of reusable components

A
  1. Classes
  2. Queues
  3. Stacks
  4. Subroutine
19
Q

What is the purpose of decomposition?

A

Makes problems easier to solve

By breaking down problems into smaller chunks, makes it easier to split workload according to individual skill sets

20
Q

What shape is used to show a decision in a flowchart?

A

A diamond

21
Q

What is concurrent thinking?

A

When you complete more than once task at the same time

22
Q

What is concurrent processing?

A

When a task takes a small part of the processors time to give the impression that multiple things are being run at once

23
Q

What is a drawback to concurrent processing?

A
  1. Concurrent processing can take longer to complete when large numbers of users or tasks are involved as processes cannot be completed at once.
  2. Not all tasks are suited to being broken up and performed concurrently.
  3. reduces program throughput
24
Q

What is parallel processing?

A

Systems where multiple instructions can
be completed at any given time, doesn’t
require multiple cores, it can use pipelining instead.

25
Q

.

A

Prefetching

26
Q

What is the first part of thinking procedurally?

A

Taking the problem defined by the user and breaking it down into parts

27
Q

.

A

Stepwise refinement

28
Q

decomposition

A

By continusly breaking down a problem into subproblems until each subproblem can be represented as a single task

29
Q

What are the benefits of a decomposition?

A
  1. Problems can be solved by different people
  2. Tasks can be tested seperatly
30
Q

What type of problems are decomposition suited to?

A

large, complex problems

31
Q

What is the second stage of thinking procedurally in software development?

A

Identifying components in a solution

32
Q

What must a software developer do before designing a subrotuine to solve a problem

A

To see if it is possible for an already existing subroutine to be used

33
Q

In a flowchart how many options stem from a decision?

A

2 different options, yes or no

34
Q

Does the result of a decision change the flow of the program

A

Yes, The program will follow a different route depending on the decision of the user