Preview

02 - Computational Thinking

 1. An _________________ is a plan, a set of step-by-step instructions to resolve a problem. In an _____________, each instruction is identified and the order in which they should be carried out is planned.

  function

  algorithm

  argument

  alacrity

 2. There are two main ways that algorithms can be represented. As P___________ and F_____________

  Pointers and Flows

  Pontification and Florification

  Pseudofunctions and Flowgraphs

  Pseudocode and Flowcharts

 3. Each step of the algorithm is written on a line of its own in sequence. In the pseudocode example below instructions are written in ______________, _____________ in lowercase and messages in sentence case.
OUTPUT 'What is your name?'
INPUT user inputs their name
STORE the user's input in the name variable
OUTPUT 'Hello' + name
OUTPUT 'How old are you?'
INPUT user inputs their age
STORE the user's input in the age variable
IF age >= 70 THEN
	OUTPUT 'You are aged to perfection!'
ELSE
	OUTPUT 'You are a spring chicken!'

  uppercase / constants

  lowercase / constants

  uppercase / functions

  uppercase / variables

 4. Before computers can solve a problem, the problem and the ways in which it can be resolved must be understood. DECOMPOSITION helps by ...

  breaking down complex problems into more manageable parts.

  analysing the problem and making it more complex

  designing the problem before actually coding a solution

  taking the problem and putting it together with other problems first to compare

 5. Why is decomposition important?
#1 Breaking the problem down into smaller parts means that each smaller problem 
can be examined in more detail.

#2Dealing with many different stages all at once is much more difficult 
than breaking a problem down into a number of smaller problems and solving 
each one, one at a time.

#3If a problem is not decomposed, it is much harder to solve.

  Statements #1 and #2 are correct

  Only statement #3 is correct

  Decomposition isn't important. It is utterly pointless.

  All three statements are correct

 6. ______ recognition is one of the cornerstones of Computer Science. It involves finding the similarities or _______ among small, decomposed problems that can help us solve more complex problems more efficiently.

  Parameters / patterns

  Pattern / syntax errors

  Pattern / patterns

  Pseudocode / functions

 7. What is the following a definition of?: "It involves filtering out, or essentially, ignoring, the characteristics that we don't need in order to concentrate on those that we do. i.e ignoring the irrelevant details of any given problem"

  This is called Abstraction

  This is called mild computerised obfuscation

  This is called Algorithmic expression

  This is called Decomposition

 8. How is abstraction used in the creation of a chess computer game? Assume that the board is created as an arrays and players are objects that have positions on the board.
uploads/chess.jpg

  Abstraction could mean that every single detail would need to be considered

  Abstraction would require the programmer to consider the shape and size of pieces

  Abstraction could mean that the shape and style of the pieces may not be required.

  Abstraction would require you to break the problem down

 9. How would abstraction be used to represent a map on a computer? Which one of the two options below best demonstrates abstraction in this case?
#1 Option 1
Towns/places would be represented with their name, maybe a circle or shape.
Roads would be lines.
Road names may be on the lines.
Fields, hedges, houses etc. would not necessarily be in the model.

# Option 2
Towns/places would be represented in great detail with expert artwork
Roads would be measured and drawn to scale
Road names, and depictions of potholes would also be shown on the lines
Fields, hedges, houses and even stones (where possible) would be included
uploads/Boston06.jpg

  Option #2

  Neither option

  Option #1

  Both options are equally valid demonstrations of the use of abstraction

 10. The following diagram shows breaking up the problem of creating a battleship game into smaller modules. This is an example of:
uploads/decomp.jpg

  decartation

  abstractional thought

  computational functional thinking

  decomposition