2.1 Elements of computational thinking Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is abstraction?

A

When you remove unnecessary details so that you are left with a simplified model that is much easier to understand.

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

What details remain when something is abstracted?

A

Only the details that are necessary to understand the meaning of the model / how to use it.

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

What does abstraction allow us to do?

A

Focus on only the necessary parts of a program.

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

Why is abstraction important in programming?

A

It simplifies solutions, saving time and resources when we write programs. Also, by simplifying the solution, it means that we need less computing power to run abstracted models, which can save money.

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

What details might you abstract from a photo to make it into a map?

A

Buildings, trees, bins, signs, cars, people

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

What might happen if we did not abstract solutions?

A

Programs might be too complicated to follow and there could be lots of errors made during the writing of it.

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

What are preconditions?

A

Preconditions are conditions that are required for your solution to work.

For example a speed camera requires a road and a car travelling along it.

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

What would the preconditions be for a self scan till.

A

Items to scan

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

What would the preconditions be for a card reader?

A

A card to read

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

How long does it take to fetch data from RAM?

A

60 nanoseconds

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

How long is a processors cycle time?

A

2 nanoseconds

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

What is level two cache?

A

A small memory chip which is built directly into the motherboard which can be accessed in 30 nanoseconds.

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

What is level one cache?

A

Memory built directly into the processor which can be accessed at the speed of the processor because there is no memory bus.

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

What does level two cache store?

A

Recently accessed data from RAM.

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

What does level one cache store?

A

Recently accessed data from level one cache.

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

What is a benefit of caching?

A

It increases the speed at which a processor can access information, therefore increasing the speed of the computer.

17
Q

How much cache do you need to speed up a computer?

A

A small amount.

18
Q

What is a drawback of cache?

A

It is expensive

Not much can be stored on it

19
Q

What are reusable components?

A

A piece of code that once written, you can copy and make minor changes to so that it can be reused in other programs / other parts of the program.

20
Q

Give an example of a reusable component.

A

Font menu in Microsoft Office (same code is reused across all of their products)

21
Q

What is a benefit of reusable components?

A

They increase the efficiency of developers when writing code because they do not need to rewrite code, they can just copy it.

22
Q

What is stepwise refinement (top down design)?

A

When a big task is split into separate sub tasks which are then split into smaller sub tasks that are easy to code. Each one is coded separately and combined to create the overall solution.

23
Q

Give some benefits of stepwise refinement.

A
  • It allows you to solve complex problems
  • Modules can be used to solve multiple problems, increasing efficiency (reusable components)
  • Easier to test as each module can be tested independently
  • Easier for a team to work on a program as they can each work on different modules, increasing efficiency
  • Reduces errors as it is clear to see how the different parts relate to each other
24
Q

Give three sub tasks that a rock paper scissors program could be split into?

A
  • Choice input
  • Winner calculation
  • Score tracker
25
Q

What are components of a solution?

A

The different parts of a program that make up the entire solution.

26
Q

What logical conditions affect a solution?

A

If statements