Computational Thinking Flashcards

1
Q

Define abstraction

A

Abstraction is the process of hiding unnecessary details while showing details that are more important in context

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

As a computational method, what is the purpose of abstraction in problem solving

A

As a computational thinking method abstraction allows to solve problems by focusing on what’s important and ignoring what isn’t

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

Explain two benefits of abstraction before writing program code

A

Two from:
Reduced development time as factors that can detract from the program can be ignored

Program more likely to solve the problem as unnecessary aspects will not detract from the main purpose of the program

Reduces complexity of programming code therefore can run on lower spec computers

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

What is the difference between a real life model and a model that has be abstracted

A

The real life model will have every detail, while the abstracted model may have removed certain details to make it easier to understand

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

How can we use the computational method ‘thinking ahead’ to outline the inputs and outputs for a system while designing it

A

The typical approach for this method is to think about what the system should output, i.e. what is the end goal

From here you can back track and create the inputs that should eventually lead to the previously outlined desired outputs

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

Describe the purpose of preconditions when thinking ahead

A

Preconditions may act as limitations and can effect the solution produced.

When thinking about how to solve a problem or design a system, preconditions should be thought about ahead of time to determine whether an idea is feasible

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

Describe the purpose of caching in a computer system as a form of thinking ahead

A

Caching is where a computer system places data in cache memory so it can be retrieved quickly. Smart algorithms can be used to prefetch data that is predicted to be need ahead of time

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

Give 1 benefit and 1 drawback of caching

A

Benefit:
improved speed and efficiency when accessing data

Drawback:
The predictive nature of caching is hard to implement and it can often lead to the wrong data being fetched, leading to it having to be removed(flushed). Maintaining the correct sequence of data in such circumstances is problematic

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

Give two benefits of using reusable code

A

two from:

Shortens development time
Save system resources
Lowers development costs
Reduces redundant code

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

Give two benefits of using reusable code

A

two from:

Shortens development time
Save system resources
Lowers development costs
Reduces redundant code

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

How does writing code in a modular way allow for the benefits of reusable code

A

Creating subroutines such as procedures, functions and methods is an example of reusable coding.

They are blocks of code than can be used multiple times simply by calling them, saving time, money and resources

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

How does the use of libraries allow for the benefits of reusable code

A

All the pre-written and pre-tested code in the library is available for the programmer to use as long as they import it. This saves them from having to write their own, potentially flawed, versions saving time, money and resources

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

Explain how think procedurally allows for a large complex task to become more manageable

A

Think procedurally is identifying the individual components in a bigger problem.

In this way, a large complex problem can be broken down in smaller, more manageable chunks

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

Name two types of diagrams which can be used to break down a problem

A

Decomposition diagrams
Top-down modular design/ structure diagrams

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

Why is it useful to consider decision points when designing a system/ program

A

Think logically by considering where decisions will have to be made allows us to consider and evaluate our options, which will likely result in a better outcome

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

What programming type can be used to make logical decisions and set logical conditions that effect the outcome of the decision

A

Selection

17
Q

Describe the process of thinking concurrently

A

Thinking concurrently is a skill which involves which parts of a program can be developed to take place, or be processed, at the same time

And on the flip side which parts of the program are dependent on each other

18
Q

Define concurrency

A

Executing multiple tasks at the same time, but not necessarily simultaneously

19
Q

What is the difference between concurrency and parallelism

A

Concurrency is about dealing with lots of things at once, while parallelism is about doing lots of things at once

dealing vs doing

20
Q

Give benefits of concurrent processing

A

The number of tasks completed in a given time is increased

The time wasted by the processor waiting on the user or another process is reduced

21
Q

Name and explain two drawbacks of concurrent processing

A

two from:

Safety:
Possibility of corrupting the consistent state of the program

Liveness:
Tasks can suspend and wait on each other indefinitely, known as deadlock

Resource consumption:
Multiple threads can consume resources in regards to scheduling, which may result in slower performance compared to ordinary sequential means