Computational thinking (unit 10) (Finished) Flashcards

1
Q

(10.1) What is computational thinking?

A

The ability to think logically about a problem and apply techniques for solving it

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

(10.1) What is abstraction?

A

a way of separating the logical and physical aspects of a problem

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

(10.1) How can abstraction be applied to situations?

A

by separating the relevant/irrelevant parts of a situation and focusing on the relevant ones

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

(10.1) How can a real world object help be solved?

A

Through abstraction, making a model of the problem and discarding all the unnecessary parts

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

(10.1) What is modeling?

A

A way of testing a scenario virtually before doing it in real life

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

(10.2) What is the simplest form a computer program can be put in?

A

Input (information relevant to the program)
Computations
Output (solution to the problem)

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

(10.2) What else do we need to specify besides inputs and outputs for programs to work?

A

Preconditions, such as length of list

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

(10.2) What are some advantages of specifying preconditions?

A

Making program components reusable

Cutting out unnecessary checks

Making programs easier to debug and maintain

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

(10.2) What is the main advantage of creating reusable program components?

A

Well-defined and documented functions and procedures may be used in many different programs

They can be added to a library and imported whenever needed

Overall save time and be efficient in using code that already works

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

(10.2) Can any modules be reusable?

A

No, they should adhere to certain standards, such as

Inputs, outputs and preconditions should be documented
Variable identifiers should conform to a standard convention
All variables must be local to the module
Documentation should be in a standard format, explaining what the module does, who it was written by, date it was written
Annotations of code should be included where necessary
All code to be peer reviewed. (Although this is time consuming.)

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

(10.2) What is caching?

A

Caching is the temporary storage of data and instructions

The last few instructions of a program to be executed, the result of an earlier computation, or data used may be stored in memory so they can be very quickly retrieved

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

(10.2) What are the disadvantages of caching?

A

Slower performance if the resource isn’t found in the cache

Being given a stale copy of a resource when an up-to-date copy is needed

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

(10.3) What is decomposition?

A

breaking a problem into a number of sub-problems, so that each sub-problem accomplishes an identifiable task

The sub-problems may themselves be further subdivided

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

(10.3) What is structured programming?

A

Structured programming aims to improve the clarity and quality of a program

method of writing a computer program which uses:
Modularization
Structured code
Recursion

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

(10.3) What is a top-down design model?

A

a system design approach where design starts from the system as a whole.

continuously divided into smaller parts until it is composed of minute details

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

(10.3) What kind of design technique does structured programming use?

A

A top-down design technique

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

(10.3) How can a hierarchy chart be used to present program structure?

A

By the decomposed program having each part of it be represented by a node in the chart

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

(10.3) In what order is a hierarchy chart executed?

A

Left to right, always starting at the lowest level component

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

(10.3) What are the benefits of modularization?

A

Programs are more easily and quickly written

Programs take less time to test and debug

Programs are easier to maintain

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

(10.3) When should the program be divided into smaller, individual modules?

A

in larger programs, as in shorter programs it may not be worth it due to the already small size

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

(10.3) What is a subprogram/module/procedure/function?

A

a small section of code within a larger piece of code which has a specific task

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

(10.3) What is modularity?

A

Splitting a larger program into smaller, more manageable parts

makes it easier to manage

programming in a modular way

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

(10.4) What makes a good algorithm?

A

has clear and precise steps that produce the correct output for any set of valid inputs
should allow for invalid inputs but then catch them
must always terminate/end at some point
should execute efficiently/quickly, in as few steps as possible
should be designed in such a way that other people will be able to understand it and modify it if necessary
#annotations

24
Q

(10.4) What are some of the tools for designing algorithms?

A

Top down diagrams
Flowcharts
Pseudocode

25
Q

(10.4) What are decision statements?

A

Conditional statements such as IF which require some sort of decision

most common cause of logic errors

26
Q

(10.4) What is a hand-tracing algorithm?

A

a method for hand simulating the execution of your code in order to manually verify that it works correctly before you compile it.

27
Q

(10.4) What is a hand tracing algorithm useful for?

A

Figuring out how an algorithm works

Finding out why an algorithm is not working properly

28
Q

(10.4) What are validation routines used for?

A

Validation routines are used to make sure a program is robust. They are used to check that a user has entered a value that can be processed

29
Q

(10.4) What validation techniques are there?

A
Range check.
Type check
Lookup check
Length check
Presence check
30
Q

(10.4) What is concurrent processing?

A

In computing, concurrent processing means that multiple processors (or cores) execute instructions simultaneously/at the same time

31
Q

(10.4) What is the use of dual and quad core processors?

A

allows the operating system to allocate seperate tasks to different cpus

32
Q

(10.4) can increasing CPU count increase computer performance?

A

Yes, but only if the program can take advantage of the extra cores via being split up or multiple processes are running at the same time

33
Q

(10.4) What is pipelining?

A

Another method of achieving concurrency

Doesn’t wait for an instruction to be executed before the next is fetched

34
Q

(10.5) What is pattern recognition?

A

Pattern recognition is a computational problem used in hundreds of different applications

35
Q

(10.5) What are some methods of problem solving?

A
trial and error
Enumeration/brute force – list all cases
simulation
theoretical approach
creative solution
36
Q

(10.5) What is simulation?

A

Simulation is the process of designing a model of a real system in order to understand the behavior of the system, and to evaluate various strategies for its operation

37
Q

(10.5) What are some examples of things that can be simulated?

A
Financial risk analysis
Amusement park rides
Population predictions
Managing inventory systems
Queueing problems
38
Q

(10.5) What is enumeration?

A

listing things in a list one by one

39
Q

(10.5) What is an example of enumeration?

A

entering a set of letters/ words into an anagram solver and allowing it to list all the possible solutions

40
Q

(10.5) What is the divide and conquer method?

A

A divide-and-conquer algorithm recursively breaks down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly

41
Q

(10.5) How is a binary search related to divide and conquer?

A

they apply the same principal, split the data in half and discard one

42
Q

(10.5) What is computational thinking?

A

a way of thinking about how to approach problems and finding optimum solutions

43
Q

(10.5) What is abstraction?

A

is used in problem solving to remove unnecessary details from the problem and in procedural decomposition, identifying sub-procedures necessary to solve the problem

44
Q

(10.6) What does GCD stand for?

A

Greatest Common Divisor

45
Q

(10.6) What is an exhaustive search?

A

trying all routes or possible options

46
Q

(10.6) What is backtracking?

A

you go some way along one route and then backtrack to see if there is a better route

47
Q

(10.6) What are some examples of heuristic methods?

A

rules of thumb
educated guesses
intuitive judgments
common sense

48
Q

(10.6) What are some applications of heuristic methods?

A
routing messages across the Internet 
building circuit boards 
transportation 
virus checking 
GPS routing
49
Q

(10.6) What is data mining?

A

Data mining is the process of collecting and then analysing huge amounts of data

50
Q

(10.6) What are some applications of data mining?

A

Increasing response rates to marketing campaigns by being able to target them more accurately to the needs of each customer
Anticipating resource demands
Detecting fraud and cybersecurity issues
Finding connections between seemingly unconnected events

51
Q

(10.6) What is big data?

A

huge amounts of data are collected and stored somewhere

52
Q

(10.6) How can supermarkets and other companies use the data they have on you?

A

Customized advertising and special offers (targeted advertising)

53
Q

(10.6) What is performance modelling?

A

a process of evaluating if a system or a program works as expected or not before it is released, and using this knowledge to make it more effective.

54
Q

(10.6) What is visualization?

A

he use of interactive, sensory representations, typically visual, of abstract data to reinforce cognition, hypothesis building, and reasoning.

55
Q

(10.6) What are heuristics?

A

A technique designed for solving a problem more quickly when classic methods are too slow or for finding an approximate solution when classic methods fail to find any exact solution.