2.1 Elements of computational thinking Flashcards

1
Q

In Thinking Procedurally, why are the order of steps needed to solve a problem?
(2.1.3)

A
  • Processing may require certain inputs
  • Input validation must occur before data usage
  • Can have interaction of multiple subroutines
  • Should prevent logical errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is concurrent thinking? (2.1.5)

A
  • Completing multiple tasks at given time
  • Time slicing between different tasks
  • Related problem parts often solvable concurrently
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does caching relate to Thinking Ahead in program development, and what
advantages / disadvantages does it have? (2.1.2)

A
  • Storing instructions / values in cache
  • Saves time retrieving
  • Quicker loading, frees bandwidth
  • Prefetching: predicts likely instruction to fetch
  • Less time waiting for fetch
  • Limited accuracy
  • Large cache 🡆 long search time
  • Difficulty implementing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the differences between abstraction and reality? (2.1.1)

A
  • Abstraction simplified representation of reality
  • Entities represented as computational structures
  • Real-world values represented by variables / constants
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What types of abstraction are there? (2.1.1)

A

Representational: removing excess details, analysing only relevant details

Data: hiding details of how data’s stored

Generalisation: grouping similarities together, common solution

Procedural: utilising functions without knowing implementation method, hides
complexity

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

What is the need for reusable program components in Thinking Ahead? (2.1.2)

A
  • Common used functions 🡆 libraries
  • Saves time, money, resources
  • Decomposition identifies reusability
  • More reliable, already tested
  • Sometimes more costly / time-consuming ensuring compatibility
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are components of a solution to a problem created in Thinking Procedurally?
(2.1.3)

A
  • Building-up from lowest-level
  • Considering inputs / outputs
  • Identifying solvability by existing methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why do we determine preconditions when devising a solution to a problem in
Thinking Ahead? (2.1.2)

A
  • Sets requirements to meet before program execution
  • Can be tested within code, or in documentation
  • Expecting arguments to meet certain criteria
  • Reduces length & complexity of program
  • Saves time debugging / maintaining
  • Subroutines more reusable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is concurrent processing, and what are its advantages / disadvantages?
(2.1.5)

A

What:

  • Each task given time slice
  • Task completion appears simultaneous

Advantages:

  • Task amounts completed in given time increased
  • Less time waste waiting for input, other tasks processable

Disadvantages:

  • Many users/tasks 🡆 longer completion time
  • Coordination / switching overhead, reduces program throughput
  • Not all tasks suited
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is identifying inputs / outputs used in designing a problem and Thinking
Ahead? (2.1.2)

A
  • Output = solution to problem
  • Methods evaluated
  • Considered upon user requirements
  • Can identify inputs required
  • Creates ease-of-use / intuition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What logical decisions can affect the outcome of a deicison, in Thinking
Logically? (2.1.4)

A
  • Effectiveness, convenience, feasibility
  • Appropriateness evaluated
  • Importance ordered
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How are components of a problem identified in Thinking Procedurally? (2.1.3)

A
  • Decomposition: breaking large complex problem into smaller subproblems
  • Easier management, divisible between team
  • Top-down design
  • Divides complexity levels
  • Broken until each subproblem = single task = single subroutine,
    self-contained
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the role of decision-making within problem-solving, in Thinking
Logically? (2.1.4)

A
  • Result reached after consideration
  • Choosing paradigm to use, information to collect
  • Solution choices limited
  • Early identification 🡆 better informed choice
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the nature and need for abstraction, and what are layers of abstraction?
(2.1.1)

A

Nature & need:

  • Removing unnecessary details of problem
  • Focusing only on relevant details implementing a solution
  • Programmers: use data structures without knowing implementation

Layers: each different role, highest closest to user, lowest performing tasks

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