Describe one way you could make the programmer’s code more readable. (1)
Category Archives: Software Design and Development
2014 – Q20 (a)
A programming language provides the following pre-defined functions.
move(n) = distance moved in pixels
rotate(d) = degrees turned (positive means clockwise)
These can be used by the programmer to draw lines.
A programmer writes the code to draw a square. The code is shown below.
Write the code that would draw a hexagon. (3)
2014 – Q19 (b) – (i)
In the game section of the website, players are shown a board with pairs of picture tiles placed randomly.
These are then flipped over to hide the images. Players have to flip two tiles trying to find two matching images until all pairs have been found.
Identify a situation in the game where Ally will need to implement the following programming constructs. (2)
Selection:
Repetition:
2014 – Q19 (a) – (iii)
When Ally is testing the website, she notices that the total carbon footprint worked out is not calculated correctly.
Explain why this is a logic error and not a syntax error. (1)
2014 – Q18 (f)
State the component required to convert the data from the mobile device’s touchscreen into data that can be used by the app. (1)
2014 – Q18 (e)
While the program is being implemented, the programmer stops occasionally to run the program.
State the type of translator you would recommend the programmer uses in this situation.
Explain your answer. (2)
Translator:
Explanation:
2014 – Q18 (d)
An athlete is developing a mobile application (app).
The athletes will allow athletes to track weight in Kg.
Part of the pseudocode for the app is shown below.
State another design notation that could have been used to design the app. (1)
2014 – Q18 (c)
The pseudocode is edited to ensure that the new weight being entered is acceptable.
(i) State the type of loop shown above. (1)
(ii) State an input the user could enter to enable the program to continue from line 18. (1)
2014 – Q18 (b)
When the code for the program is written the programmer mis-types the word UNTIL, typing UNTOL instead.
State the type of programming error being described above. (1)
2014 – Q18 (a)
An athlete is developing a mobile application (app).
The athletes will allow athletes to track weight in Kg.
Part of the pseudocode for the app is shown below.
(i) Identify the line that contains a condition. (1)
(ii) Identify the line that stores a value in an array. (1)
(iii) Identify the line that accepts input values into the program. (1)