The questions below are designed to test your understanding of the terminology involved with Algorithms. Write out an snwer to each question and then click on the answer button to display the correct answer.
Q1. Explain the difference between a computer program and an algorithm. (2 marks)
Example answer
An algorithm is a set of insructions to solve a task. [1]
A computer program is one implementation of an algorithm. [1]
Award one mark per point made
Q2. Explain how decomposition applies to making a computer game to play rock, paper, scissors against a computer opponent.(2 marks)
Example answer
Decomposition is breaking a task into smaller individual tasks to make it easier to solve. [1]
This program could be broken up into parts such as get users choice, generate random computer choice, check for winner etc. [1]
Award one mark for the reason for decomposition (not awarded if the answer does nt mention the reason i.e. to make it easier to understand). Award a second mark for any sensible example of modules from a rock paper scissors game.
Q3. You are to code a digital version of the game battleships. Name 3 modules that will be part of the fully decomposed game.(3 marks)
Example answer
Possible modules: Place ship, get co-ordinate, check for hit, check if sunk, output result, draw grid, check for winner etc.
Award one mark per appropriate module. Allow any sensible module that would perform just one function.
Q4. Explain abstraction using the London tube map as an example.(3 marks)
Abstraction is removing unnecessary detail from a problem to make it easier to solve. [1]
Above ground roads are not included. If the above ground roads were included it would make the map too cluttered to read. [1]
The distances are not to scale. This is especially true in the center of the city where stations are positioned so their names can be easily displayed. [1]
The exact path of the tracks is not shown. Small twists and turns in the path of the tracks are smoothed out to make the map easier to understand.[1]
Award one mark for the definition of abstraction and one mark each for up to 2 properly explained examples of abstraction used in creating the London Tube Map. Allow other sensible properly explained examples.
Properly explained examples would be where it is clear how removing the detail mentioned makes it easier to create an effective tube map. No marks for simply stating details that have been omitted.