Describe one way you could make the programmer’s code more readable. (1)
Category Archives: Section 2
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) – (iv)
When the website is released it has a pdf file that can be downloaded free.
She has a wireless network available as well as her mobile phone network.
State one reason for selecting the wireless option to download the pdf. (1)
2014 – Q19 (b) – (iii)
When creating the website, Ally copies images, sections of text and ideas from a website about energy use.
Explain why she might be in breach of the Copyright Designs and Patents Act. (1)
2014 – Q19 (b) – (ii)
When a correct pair of images are found, a tip giving advice about energy use or conservation is displayed.
Write the advice that should be included with these images. (2)
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 – Q19 (a) – (ii)
At the end of the questions, the user’s carbon footprint is calculated.
Explain what is meant by carbon footprint. (1)
2014 – Q19 (a) – (i)
Ally has designed a website that encourages children to learn about energy saving and conservation.
Ally plans to include 2 sections – a personal carbon footprint calculator and a game to play.
The carbon footprint calculator takes the user through a list of questions about their current energy usage.
Here are Ally’s designs for some of the questions.
(i) Referring to the designs above, draw a diagram to represent the navigation structure for the carbon footprint calculator. (2)
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)