wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

N5 Computing Science: SDD + CS Exam Questions

Total questions: 131

Worksheet time: 2hrs 50mins

Name
Class
Date
1.

Convert the following 8-bit binary number into denary.

1011 0111

(a)  

2.

Why may it be necessary to return to the implementation stage of an

iterative development process after the testing stage?

a)

To correct errors

b)

To add new features

c)

To change the programming language

d)

To charge the client more money

3.

The code shown monitors the speed of a vehicle. Choose the actions that correspond with what happens in lines 6 to 9 above if the sensor detects a value of 83 at line 5.

a)

compares 83 to 70

b)

condition is false so doesn’t enter loop

c)

sends signal to alarm

d)

condition is true so enters loop

e)

new speed is detected from sensor

4.

The Bank of Aberdeen uses a firewall and encryption to ensure data is kept

secure.

Which description best explains the purpose of a firewall.

a)

Restricts access to a network for unauthorised users

b)

Scrambles data to make ir unreadable

c)

Allows customers to acces their banking online

d)

Prevents viruses and malware from entering the network

5.

The Bank of Aberdeen uses a firewall and encryption to ensure data is kept

secure.

How can encryption help keep data secure?

a)

Data is encoded and therefore unreadable

b)

Prevents unauthorised users from accessing data

c)

Prevents malware from entering the network

d)

Data is stored in a database using a special key

6.

An ASCII character set contains control characters.

Choose one example of a control character.

a)

Cancel

b)

Space

c)

Delete

d)

#

7.

An ASCII character set contains printable characters.

Choose one example of a printable character.

a)

Space

b)

Null

c)

Escape

d)

Backspace

8.

A vector graphic file stores objects and their attributes.

State the type of vector object shown.

(a)  

9.

A vector graphic file stores objects and their attributes.

Choose two attributes of this object.

a)

Co-ordinates of centre

b)

Fill colour

c)

Number of sides

d)

Angle of corner

10.

Jane is entering an online competition. She edits a recording of herself singing

to save and upload to the competition’s website.

Describe one advantage and one disadvantage of saving and uploading an

MP3 file format rather than a WAV file format to the website.

a)

Advantage

1.

Can be uploaded quickly

b)

Disadvantage

2.

Sound quality is poorer than original

c)

Neither

3.

Uses psychoacoustic

modelling techniques

11.

Switching off a computer system when it is not being used reduces energy use.

Choose two other methods of reducing the energy use of a computer system.

a)

set to go into sleep

mode after a period of inactivity

b)

reduce monitor brightness

c)

clean up the hard disk drive or internal storage

d)

reduce size of RAM memory

12.

The value 195 would be stored in a computer system using ‘floating-point

representation’ as shown:

0195×1030·195\times10^3

Identify the mantissa and exponent in the above floating-point representation.

mantissa is ​ (a)  

exponent is ​ (b)  

Choose from the below words
195
3
0.195

10310^3  

195.0
1000
1.95
19.5
13.

Convert the decimal number 60 into 8-bit binary.

(a)  

14.

The code shown is used to input and display the points in a game.

When ‘Scotland’ and ‘27’ are input the following output is produced by the program.

Scotland scored 27 points

Which line of code will correctly produce this output?

a)

print(teamName,' scored', totalPoints, 'points')

b)

print(teamName, scored, totalPoints, points)

c)

print('Scotland scored 27 points')

d)

print('teamName',' scored', 'totalPoints', 'points')

15.

A club requires a program to calculate how much each member needs to pay in membership fees.

Choose the correct variable type for yearsOfMembership ​ (a)   and membersName ​ (b)  

Choose from the below words
integer
string
real
float
Boolean
char
text
16.

A train company is designing a program to handle passenger complaints. Part of the design is shown.

State which type of loop is used in this design.

(a)  

17.

When a train is delayed, passengers are entitled to a 25% refund on the cost of

their ticket.

Which of these possible designs correctly shows how the refund would be

calculated?

a)

SET refund TO ticketCost*0.25

SET ticketCost TO ticketCost - refund

b)

SET refund TO ticketCost*0.75

SET ticketCost TO refund - ticketCost

c)

SET ticketCost TO refund*0.25

SET refund TO refund - ticketCost

d)

SET refund TO ticketCost*25

SET ticketCost TO 100 - refund

18.

The cruising speed of an aeroplane is 891.6 kilometres per hour. This value would

be stored in a computer system using floating-point representation as shown below.

08916×1030·8916\times10^3

Identify the mantissa and exponent in the above floating-point representation.

mantissa = ​ (a)  

exponent = ​ (b)  

Choose from the below words
8916
3
0.8916

10310^3  

891.6
891
0.6
0.891
19.

The code shown is being tested to ensure it produces the correct output.

State the score that should be input in Line 3 to display ‘Success’.

(a)  

20.

The code shown is being tested to ensure it produces the correct output.

State one logical operator used in the code.

(a)  

21.

A graphic designer creates a business card for a taxi company.

State the type of a graphical object used in this design.

(a)  

22.

A graphic designer creates a business card for a taxi company.

Which of these is not a possible attribute of an object that can be altered by the graphic designer.

a)

(x,y) coordinates

b)

fill colour

c)

width

d)

line thickness

e)

number of wheels

23.

In a flight booking app, users are asked to enter their departure airport,

destination airport, departure date, return date, number of adults and number of

children.

A message will then be displayed showing the total flight cost and the duration of

the trip.

Choose two processes for the flight booking app.

a)

calculate total cost of flights

b)

calculate number of days for trip

c)

calculate how much travel money needed for trip

d)

book airport taxis

e)

order in-flight food and drinks

24.

In a flight booking app, users are asked to enter their departure airport,destination airport, departure date, return date, number of adults and number of children.

Passengers are allocated an available seat. A data structure named seats is used to store whether each seat is available (true) or unavailable (false).​

State the most suitable data structure and data type used to store the

seat availability.

Data structure: ​ (a)  

Data type: ​ (b)  

Choose from the below words
1-D array
Boolean
2-D array
String
integer
real
char
25.

In a flight booking app, users are asked to enter their departure airport,destination airport, departure date, return date, number of adults and number of children.

The app provides an option to add bags to the booking. Each passenger is asked if they want to add a bag. The cost is an additional £7 for each passenger who decides to take a bag.

Choose a design that correctly refines step 4.

a)

Loop for each passenger

Ask if passenger wants a bag

If answer = yes

Add 7 onto bag total

End if

End loop

Total = total + bag total

b)

Loop for each passenger

Ask if passenger wants a bag

If answer = yes

Add 1 onto bag count

End if

End loop

Total = total + bag count

c)

Loop for each passenger

Ask if passenger wants a bag

If answer = yes

Add 1 onto total

End if

End loop

d)

Loop for each passenger

Ask if passenger wants a bag

If answer = no

Add 7 onto bag total

else Total = total + bag total

End if

End loop

26.

In a flight booking app, users are asked to enter their departure airport,destination airport, departure date, return date, number of adults and number of children.

The app provides an option to add bags to the booking. Each passenger is asked if they want to add a bag. The cost is an additional £7 for each passenger who decides to take a bag.

Choose a design that correctly refines step 4.

a)

Loop for each passenger

Ask if passenger wants a bag

If answer = yes

Add 7 onto bag total

End if

End loop

Total = total + bag total

b)

Loop for each passenger

Ask if passenger wants a bag

If answer = yes

Add 1 onto bag count

End if

End loop

Total = total + bag count

c)

Loop for each passenger

Ask if passenger wants a bag

If answer = yes

Add 1 onto total

End if

End loop

d)

Loop for each passenger

Ask if passenger wants a bag

If answer = no

Add 7 onto bag total

else Total = total + bag total

End if

End loop

27.

In a flight booking app, users are asked to enter their departure airport,destination airport, departure date, return date, number of adults and number of children.

Passengers are allocated an available seat. A data structure named seats is used to store whether each seat is available (true) or unavailable (false).​

State the most suitable data structure and data type used to store the

seat availability.

Data structure: ​ (a)  

Data type: ​ (b)  

Choose from the below words
1-D array
Boolean
2-D array
String
integer
real
char
28.

In a flight booking app, users are asked to enter their departure airport, destination airport, departure date, return date, number of adults and number of children.

Passengers are allocated an available seat. A data structure named seats is used to store whether each seat is available (true) or unavailable (false).

The pseudocode design shows how an available seat is allocated.

Which piece of code correctly implements this design?

a)

Code 1

b)

Code 2

c)

Code 3

d)

Code 4

29.

In a flight booking app, users are asked to enter their departure airport, destination airport, departure date, return date, number of adults and number of children.

Passengers are allocated an available seat. A data structure named seats is used to store whether each seat is available (true) or unavailable (false).

The pseudocode design shows how an available seat is allocated.

Choose two statements which explain why the above design becomes less efficient as more passengers are allocated seats.

a)

a seat generated is more likely to be allocated already

b)

The loop will repeat more times

c)

The loop will repeat fewer times

d)

a seat generated is less likely to be allocated already

30.

In a flight booking app, users are asked to enter their departure airport,

destination airport, departure date, return date, number of adults and number of

children.

The app will store passenger information.

How could this information be transferred securely from the app to the

computers running the booking system?

a)

Using an encrypted connection

b)

Using a locked USB drive

c)

By private courier service

d)

Using a compressed file format

31.

A program is being designed to allow users to search for properties for sale.

Pseudocode was used to design the program.

State another technique that could be used to design the program.

(a)  

32.

A program is being designed to allow users to search for properties for sale.

The software development process is described as iterative.

Which answer is NOT a reason why it may be necessary to return to the design stage.

a)

logic errors were found at a later stage

b)

new features are requested by the clients

c)

the program is not fit for purpose

d)

the program code was not properly documented

33.

A program is being designed to allow users to search for properties for sale.

The user can search for properties priced from £50,000 to £600,000.

Test data is used to ensure the validation of the price entered works

correctly.

Complete the test table with one appropriate numerical value for each input.

Extreme: ​ ​ (a)  

Exceptional: ​ ​ (b)  

Choose from the below words
600,000
5,000
250,000
100,000
550,000
34.

A program is being designed to allow users to search for properties for sale.

A username and password are added to allow users to save searches.

Part of the code is shown.

How is indentation used to make the code above more readable?

a)

it shows which code is inside the conditional statement

b)

it shows the start and end of the program

c)

it shows which code is inside the loop

d)

it spaces out the code

35.

A program is being designed to allow users to search for properties for sale.

A username and password are added to allow users to save searches.

Part of the code is shown.

Which answer is NOT a way in which Line 11 could be made more readable?

a)

use more meaningful identifier names

b)

provide an internal comment

c)

use parenthesis to seperate the conditions

d)

use text that is all in lower case

36.

A program is being designed to allow users to search for properties for sale.

A username and password are added to allow users to save searches.

Part of the code is shown.

A user enters the password below.

GRK_0183_J

State how many bits would be required to store the password using

extended ASCII code.

(a)  

37.

A program is being designed to allow users to search for properties for sale.

A username and password are added to allow users to save searches.

Part of the code is shown.

Line 11 should have used AND instead of OR.

State the type of error that using OR would cause when the program is

executed.

​ (a)  

Choose from the below words
logic error
syntax error
run-time error
formatting error
spelling error
38.

A program is being designed to allow users to search for properties for sale.

A username and password are added to allow users to save searches.

Part of the code is shown.

​ After final testing, the program is run without requiring any further translation software.

State the type of translator that has been used.

(a)  

39.

Sam is creating a program to calculate and display the total cost of laying new

flooring.

The total cost is calculated by multiplying the total floor area by 15, then adding

the number of rooms requiring skirting multiplied by 60.

State the part of the processor used to temporarily store the result of the

calculation.

(a)  

40.

Sam is creating a program to calculate and display the total cost of laying new flooring.

Sam completes five jobs in July and earns the following.

£562.77, £675.44, £287.91, £245.22, £899.66

The section of code shown calculates Sam’s monthly earnings for July.

When evaluating this code, it is found to be inefficient.

Choose the best code that rewrites Lines 7 to 12 using more efficient constructs.

a)
b)
c)
d)
41.

Sam is creating a program to calculate and display the total cost of laying new flooring.

Sam takes pictures of floor layouts using a tablet device.

The images are stored as bit-mapped images.

Choose two correct statements about how a bit-mapped image would be stored.

a)

Images are represented by pixels

b)

Each pixel has a binary value representing its colour

c)

Images are represented by objects with attributes

d)

Images usually take up a small amount of storage space

42.

Sam is creating a program to calculate and display the total cost of laying new flooring.

Sam takes pictures of floor layouts using a tablet device.

Choose one answer that would NOT help Sam reduce the energy consumption of the tablet.

a)

Reduce screen brightness

b)

Close unused apps and tabs

c)

Adjust screen power-off settings

d)

Update the system software to latest version

43.

Convert the following 8-bit binary number into denary.

1011 1001

(a)  

44.

The sorted output below was produced by running a query in a database.

Complete the SQL statement used to produce this sorted output.

SELECT productCode, productName, manufacturer, description

FROM Product

ORDER BY ​ (a)   ​ (b)   ;

Choose from the below words
manufacturer ASC
productCode DESC
manufacturer DESC
productCode ASC
productNAME ASC
description
productName DESC
45.

A garden centre requires a program to calculate the price of apple, pear and cherry trees being sold.

The design is shown.

State the type of loop shown in the design

(a)  

46.

A garden centre requires a program to calculate the price of apple, pear and cherry trees being sold.

The design is shown.

The design is tested. For the following inputs state the total displayed.

Number of trees – 2

Type of tree – cherry

Size of tree – small

Type of tree – pear

Size of tree – medium

(a)  

47.

A garden centre requires a program to calculate the price of apple, pear and cherry trees being sold.

The design is shown.

The garden centre is considering selling orange trees for £23·00.

Explain why the design does not need to be changed.

a)

Because it is not an apple or pear tree it would still be set to the default price of £23

b)

Because it is not an apple, pear or cherry tree

c)

Because it comes in the same sizes of large or medium

d)

Because all trees have the same price

48.

Part of a program requires a user to input the total score

achieved when they roll a pair of six-sided dice.

For example, if the user rolled a 4 and a 1 they would input 5.

State the extreme values required to test this part of the program.

Extreme 1: ​ (a)  

Extreme 2: ​ (b)  

Choose from the below words
2
12
1
3
6
0
13
11
-1
49.

Part of a program requires a user to input the total score

achieved when they roll a pair of six-sided dice.

For example, if the user rolled a 4 and a 1 they would input 5.

The code shows part of the program.

Which standard algorithm is shown.

a)

Running total

b)

Input validation

c)

Looping through a 1D array

d)

Linear search

50.

Three records from a database table are shown below.

Choose a suitable type of validation for the bookRef field.

a)

Length check

b)

Restricted choice

c)

Range check

d)

Type check

51.

A database query design includes the following conditions in the search

criteria.

delivery > 01/05/2019 AND delivery < 31/05/2019

State the part of the processor where these conditions will be evaluated.

(a)  

52.

The programming language below uses & to concatenate two strings.

SET message TO "hello" & "world"

When coding, a programmer types £ instead of & leading to an error.

State the type of programming error (one word only)

(a)  

53.

The programming language below uses & to concatenate two strings.

SET message TO "hello" & "world"

When coding, a programmer types £ instead of & leading to an error.

Which answer is NOT a possible effect of this error.

a)

the program will not run

b)

program stops running at line with error

c)

program reports an error message

d)

program displays a different output

54.

The line shown is stored as a vector graphic.

Which attribute is not a possible attribute of this object?

a)

x- or y- coordinate

b)

line width

c)

line colour

d)

length

55.

The program shown is used to switch a security light on or off depending on a reading taken from a light sensor.

State the smallest light sensor value that would result in the security light being switched off.

(a)  

56.

The value 765·2 would be stored in a computer system using

‘floating-point representation’ as shown below.

07652×1030·7652\times10^3

Identify the mantissa and exponent in the above floating-point

representation.

mantissa = ​ ​ (a)  

exponent = ​ (b)  

Choose from the below words
7652
3
0.7652
765.2
76.52

10310^3  

0.7652 ×1030.7652\ \times10^3  

1000
7.652
57.

State a precaution used to secure data in digital communications.

(one word only)

(a)  

58.

The code for part of a program is shown.

State the pre-defined function that could be used in Line 43.

(a)  

59.

The code for part of a program is shown.

State a parameter of the pre-defined function that could be used in Line 43.

(a)  

60.

The design shown below asks a user to enter the age of their dog. It then

displays advice on how many minutes the dog should be walked each day.

Click on the condition in the design.

61.

The program code shown calculates the delivery cost of orders.

State the natue of the error that could cause the incorrect output to be displayed at line 18.

a)

Wrong variable name used on line 16

b)

AND used instead of OR on line 13

c)

The values 5.00 and 1.50 are on the wrong lines

d)

No need for NOT on line 13

62.

The program code shown calculates the delivery cost of orders.

Identify one logical operator in the code.

(a)  

63.

The program code shown calculates the delivery cost of orders.

State the delivery cost for the following order.

Card Type: Gold

Order Total: 43.00

(a)  

64.

Choose two reasons for using a conditional loop when writing code?

a)

When impossible to know how many times the loop will execute

b)

When it can be predicted how many time the loop will execute

c)

To repeat code until a Boolean condition becomes True or False

d)

To repeat code for each item in a data structure

65.

How is a real number stored in a computer’s memory?

a)

Stored as a mantissa and an exponent

b)

Stored in binary

c)

Stored in hexadecimal

d)

Stored in cache memory

66.

The validity of a password is checked as part of a program.

State the data type used to store the variable “passValid”.

(a)  

67.

How are vector images stored in a computer?

a)

As an object with a set of attributes

b)

As a list of binary numbers representing the colour of the pixels

c)

As an image with a magnitude and direction

d)

As a rectangular array of pixels

68.

Part of a program is shown.

What happens in Lines 3 to 6 when the value 2.0 is entered at Line 2?

a)

"Failed to qualify" message is displayed

b)

"Congratulations" message is displayed

c)

No message is displayed

d)

Both messages are displayed

69.

A complex condition is used to decide if hotel customers qualify for a free

night’s stay. Part of the program is shown.

State all possible outputs when the test data shown is used in this program.

a)

P Singh

H Smith

b)

P Singh

R Kroon

H Smith

c)

J Kerr

P Singh

H Smith

d)

no output

70.

Part of the design of a program is shown.

Identify the graphical design notation shown.

(a)  

71.

Convert the decimal value 227 into the equivalent 8-bit binary number.

(a)  

72.

Why is it important that program code is readable?

a)

To make it easier to maintain and change the program

b)

So the program runs faster

c)

So the program runs more efficiently

d)

So the program does not crash

73.

What is the function of a processor’s registers?

a)

To store values required to execute a program instruction

b)

To store frequently used program instructions

c)

To carry out calculations required by the program

d)

To transfer data to and from the main memory

74.

This code design monitors the temperature of food as it is reheated.

What will happen in lines 2 to 5 if the sensor detects a reading of 63°?

a)

The message "temperature too low" will display and a new reading will be taken

b)

The loop will end and execution will continue after Line 5

c)

A new temperature reading will be taken

d)

Nothing will happen

75.
Question Image

Translators are used to convert high level languages into machine code.

Identify each type of translator.

a)

This translator program reports

errors at the end of translation.

1.

compiler

b)

This translator needs to be present

in memory each time the program is

executed.

2.

interpreter

c)

This translator creates one line of machine code for every instruction

3.

assembler

76.

A running group has 16 members. They are taking part in a marathon.

Which code will correctly take in and store each runner’s time for the marathon?

a)
b)
c)
d)
77.

Convert the denary number 75 into binary.

(a)  

78.

The value 637·1 is stored in a computer system using floating-point representation as shown below.

6371×1026·371\times10^2

Identify the mantissa and exponent in the above floating-point representation.

Mantissa: ​ (a)  

Exponent: ​ (b)  

Choose from the below words
6371
2
6.371
637.1
100
63.71

10210^2  

0.6371
79.

Summer’s Nursery use a program to assign all its enrolled children into groups based

on their age:

• children who are above 4 years-old are the “Funky Frogs”

• children who are between 3 years-one-day-old and 4 years-old are the

“Manic Monkeys”

• children between 2 and 3 years old are the “Super Salamanders”.

If a child’s birthday occurs during the term, then the system automatically changes

their group and alerts the staff. The staff do have the ability to override this in

exceptional circumstances.

Every year the program assigns the groups to a different member of staff.

Choose two processes required in this program.

a)

assigning a group to a member of staff

b)

changing a child’s group once they meet a certain age

c)

generating the group names

d)

storing details of children's birthdays

80.

A short password protection program is being written.

The user enters “let me in” as the password but the program crashes.

Why does the program crash when the correct password is entered?

a)

password is set to be entered as a real value while the password is a string

b)

The password is too long

c)

TRUE and FALSE have been mixed up

d)

The password should be a real number

81.

Tom has installed a new smart heating system in his home.

Shown is the section of code that controls when the heating switches on.

Which code shows the correct completion of line 9?

a)

TEMP >= 14.5

b)

TEMP < 14.5

c)

TEMP > 14.5

d)

TEMP >= 14.6

82.

Tom has installed a new smart heating system in his home.

Shown is the section of code that controls when the heating switches on.

State the smallest value which would switch off the heating system.

(a)  

83.

The software development cycle is an iterative process.

Which answer best describes what is meant by the term iterative?

a)

to return to a previous stage to make changes based on

information gained at the stage being worked on

b)

Each stage is repeated several times before moving on to the next stage

c)

The entire development process is completed once, then repeated to make improvements

d)

Each stage is completed before the next stage begins

84.

Pav has decided to learn how to program.

He has written a program which calculates how much money he earns, based on the

hours that he has worked.

When running the program and entering his hours he notices that he gets an execution error.

What is the most suitable type of translator for Pav to use when translating the

program into binary.

a)

Interpreter

b)

Compiler

c)

Assembler

d)

Other

85.

Pav has decided to learn how to program.

He has written a program which calculates how much money he earns, based on the

hours that he has worked.

When running the program and entering his hours he notices that he gets an execution error.

After fixing the errors Pav adds internal commentary to make his code more

readable.

Choose two other ways in which Pav could make his code more readable.

a)

Use meaningful identifier names

b)

Use of white space

c)

Use of built-in library subroutines

d)

Use of longer variable names

86.

Pav has decided to learn how to program.

He has written a program which calculates how much money he earns, based on the

hours that he has worked.

Pav decides to let one of his friends test the program for him.

Pav can work a maximum of 40 hours a week and his friend notices that the

program allows the user to enter values less than 1 and values greater than 40.

What standard algorithm should Pav use to prevent this from happening?

a)

Input validation

b)

Running total

c)

Traversing a 1D array

d)

Count occurrences

87.

The logo shown is stored as a vector graphic.

A polygon is one object used in this logo.

Which one is NOT an attribute of this object?

a)

x co-ordinate

b)

y co-ordinate

c)

fill color

d)

line color

e)

radius

88.

The logo shown is stored as a vector graphic.

A polygon is one object used in this logo.

State the name of one other object used in this logo.

(a)  

89.

An email has been intercepted by a hacker whilst being sent across a network. Part of the contents of the email are shown below.

A!e% #e 7y zX$s _£

What has been done to the email to avoid it being understood by the

hacker?

a)

Downloaded

b)

Decompressed

c)

Encrypted

d)

Decrypted

90.

A school wants to reduce the energy consumption of the Computing department.

Pupils are already encouraged to put the computers into standby mode when not in

use.

Choose two other methods to reduce the energy consumption of the computers.

a)

adjust settings on monitors

b)

reduce clock speed

c)

uninstall unused applications

d)

decrease amount of RAM

91.

Snooker uses seven different coloured balls, each worth a different number of points.

A program has been written to record the number of points scored as each ball is potted.

Categorise the examples of extreme, exceptional and normal test data that can be used for the input of points

Categorize the following

1

7

0

8

a

1.5

2

5

Extreme
Exceptional
Normal
92.

A program is being designed to control the gas burner on a barbecue.

State the design technique shown.

(a)  

93.

WordSmart is a computer game where players are shown a definition of a word and

are asked to enter the word being described.

A player enters the answer:

SERVER

State how many bits would be required to store the player’s answer using

extended ASCII code.

(a)  

94.

WordSmart is a computer game where players are shown a definition of a word and

are asked to enter the word being described.

State the part of the processor used to temporarily store the answer.

(a)  

95.

WordSmart is a computer game where players are shown a definition of a word and

are asked to enter the word being described.

If the correct word is entered, a point is awarded for each letter of the word as shown below.

DEMOCRACY: 9 points

SERVER: 6 points

State the predefined function used to count the number of characters in the

player’s correct answer.

(a)  

96.

Curling is a sport where stones are thrown down a lane of ice towards a target. In

the example below, stone B is closest to the middle of the target and is the winner.

A computer program calculates the distance of each stone from the middle of the

target. The code below has been written to identify the winning stone but produces

the wrong output.

State the type of error in the code above and how it can be corrected.

Type of error: ​ ​ (a)  

Correction: ​ (b)  

Choose from the below words
logic
change < to >
syntax
run-time
change > to <
execution
change < to <=
change < to !=
97.

Curling is a sport where stones are thrown down a lane of ice towards a target. In

the example below, stone B is closest to the middle of the target and is the winner.

A computer program calculates the distance of each stone from the middle of the

target. The code below has been written to identify the winning stone but produces

the wrong output.

State the part of the processor used to compare stone_A_distance to

stone_B_distance.​

(a)  

98.

A window replacement company employs a programmer to write a program that

calculates how much it will cost to fit triple glazed windows.

Small windows cost £299.99 and large windows cost £499.99 to replace.

The algorithm to calculate the cost is shown.

Step 6 in the algorithm calculates and updates the total cost.

Using a programming language of your choice, complete the code for step 6.

SET ​ (a)   TO numSmall * ​ (b)  

SET large TO ​ (c)   ​ (d)   499.99

SET ​ (e)   TO totalCost + small + large

Choose from the below words
small
numLarge
299.99
*
totalCost
+
large
numSmall
99.

A window replacement company employs a programmer to write a program that calculates how much it will cost to fit triple glazed windows.

Small windows cost £299.99 and large windows cost £499.99 to replace.

The algorithm to calculate the cost is shown.

A hotel wants to replace 114 windows.

Convert this denary number to 8-bit binary.

(a)  

100.

A window replacement company employs a programmer to write a program that

calculates how much it will cost to fit triple glazed windows.

Small windows cost £299.99 and large windows cost £499.99 to replace.

The algorithm to calculate the cost is shown.

The total cost should be output as shown below.

The cost is £14999.50 for the windows

Using a programming language of your choice and the variable name

totalCost, write the code to produce the output above.

DO NOT INCLUDE ANY SPACES IN YOUR CODE, USE " " TO DELIMIT STRINGS

(a)  

101.

A 9-hole golf course is introducing an app to replace paper scorecards. The total score is the number of times the player hits the ball to complete all 9 holes.

Shown is an example of a paper scorecard that a player has filled in.

Complete the analysis for the app by identifying the inputs and the output.

Categorize the following

Add up the scores

Validate scores

Golfer name

Date of game

Score per hole

Total score

Number of holes

Total par score

Inputs
Process
Outputs
None
102.

A 9-hole golf course is introducing an app to replace paper scorecards. The total score is the number of times the player hits the ball to complete all 9 holes.

The shown user interface is designed for the player to enter their score for each hole.

Choose two reasons why this user interface design is not fit for purpose.

a)

No next hole button

b)

No submit button

c)

Some text is too small

d)

No colour display

e)

Does not show total score

103.

A 9-hole golf course is introducing an app to replace paper scorecards. The total score is the number of times the player hits the ball to complete all 9 holes.

Each hole has a target score known as the par value.

If a score entered is three or more above the par value for that hole it is

adjusted to the par value plus two. This is shown for holes 3 and 6.

Part of the code for the app is shown below.

Line 10 REPEAT 9 TIMES

Line 11 RECEIVE par FROM (INTEGER) KEYBOARD

Line 12 RECEIVE score FROM (INTEGER) KEYBOARD

Line 13 < calculate final score for each hole >

Line 14 < update totalScore >

Line 15 END REPEAT

Line 16 SEND totalScore TO DISPLAY

Choose the correct code for line 13.

a)

if score > par+2:

score = par+2

b)

if score > par:

score = par+2

c)

if score == par+2:

score = par+2

d)

if score < par+2:

score = par+2

104.

A 9-hole golf course is introducing an app to replace paper scorecards. The total

score is the number of times the player hits the ball to complete all 9 holes.

The final scores are stored within the app.

State the most suitable data structure and data type for storing the final score

for each hole.

Data structure: ​ (a)  

Data type: ​ (b)  

Choose from the below words
1-D array
integer
2-D array
String
float
Boolean
char
set
linked list
105.

A 9-hole golf course is introducing an app to replace paper scorecards. The total

score is the number of times the player hits the ball to complete all 9 holes.

The app uses the shown bit-mapped graphic.

Choose two statements about how a bit-mapped graphic is represented in a computer system’s

memory.

a)

stores data about each pixel

b)

stores binary representing RGB colour value

c)

stores data about each object

d)

stores lists of attributes and values

e)

stores number of pixels in image

106.

A communications company uses a program to calculate a customer’s average data

usage over a 12-month period.

An example of a customer’s monthly data usage in gigabytes (GB) is shown.

The data usage for the customer in May is 35.7 GB. This value would be stored

in a computer system using floating-point representation as shown below.

0.357 × 1020.357\ \times\ 10^2

Identify the mantissa and exponent in the above floating-point representation.

Mantissa: ​ (a)  

Exponent: ​ (b)  

Choose from the below words
357
2
0.357
10210^2
0.357 × 1020.357\ \times\ 10^2
35.7
3.57
107.

A communications company uses a program to calculate a customer’s average data

usage over a 12-month period.

An example of a customer’s monthly data usage in gigabytes (GB) is shown.

The design shows how a customer’s average monthly data usage is

calculated and displayed.

The data structure month is used to store the data usage.

The variable aveData is used to store a customer’s average monthly data

usage.

Using a design technique of your choice, refine step 2

a)

2.1 Set total to 0

2.2 Loop 12 times

2.3 Set total to total + month [index]

2.4 End loop

2.5 Set aveData to total/12

b)

2.1 Loop 12 times

2.2 Set aveData to month[index]/12

2.3 End loop

c)

2.1 Loop 12 times

2.2 Set total to total + month [index]

2.3 End loop

2.4 Set aveData to total/12

d)

2.1 Loop 12 times

2.2 Set month [index] to month[index] + total

2.3 End loop

2.4 Set aveData to total/12

108.

A communications company uses a program to calculate a customer’s average data usage over a 12-month period.

The following code checks if the customer receives both their mobile data and broadband from the company before offering them a discount.

During translation the program stops and produces an error at line 48.

State the type of error that the programmer has made and how the error

can be corrected.

Type of error: ​ (a)  

Correction: ​ (b)  

Choose from the below words
Syntax
remove space to make custDiscount
Logic
Run-time
change AND or OR
change to bill * 20
set custDiscount TO 20.0
109.

A communications company uses a program to calculate a customer’s average data usage over a 12-month period.

The following code checks if the customer receives both their mobile data and broadband from the company before offering them a discount.

Identify the logical operator in the code.

(a)  

110.

A communications company uses a program to calculate a customer’s average data usage over a 12-month period.

The following code checks if the customer receives both their mobile data and broadband from the company before offering them a discount.

Identify the logical operator in the code.

(a)  

111.

Tarvit High School is trialling a voting system to decide their representative for the pupil council. A programmer creates a voting app to allow pupils to cast their vote.

The winner is displayed once voting is closed.

Identify one process NOT carried out by the voting app.

a)

find winning representative

b)

total votes for each candidate

c)

validate the input

d)

display winning candidate

112.

Tarvit High School is trialling a voting system to decide their representative for the pupil council. A programmer creates a voting app to allow pupils to cast their vote.

The winner is displayed once voting is closed.

A pupil must enter A, B, C or D to cast their vote.

State the most suitable data type for storing the vote.

(a)  

113.

Tarvit High School is trialling a voting system to decide their representative for the pupil council. A programmer creates a voting app to allow pupils to cast their vote.

The winner is displayed once voting is closed.

A pupil must enter A, B, C or D to cast their vote.

Which of these designs will allow other values to be entered?

a)

WHILE

NOT (vote = 'A') AND NOT (vote ='B') AND NOT (vote = 'C') AND NOT (vote='D') DO

RECEIVE vote

END WHILE

b)

WHILE

NOT (vote = 'A' OR vote='B' OR vote='C' OR vote='D' DO)

RECEIVE vote

END WHILE

c)

REPEAT

RECEIVE vote

UNTIL vote='A' OR vote='B' OR vote='C' OR vote='D'

END REPEAT

d)

WHILE

NOT (vote = 'A' AND vote='B' AND vote='C' AND vote='D' DO)

RECEIVE vote

END WHILE

114.

Tarvit High School is trialling a voting system to decide their representative for the pupil council. A programmer creates a voting app to allow pupils to cast their vote.

The winner is displayed once voting is closed.

The following code displays the number of votes for each candidate.

Before the code is run it must be translated.

Complete the table below to identify the type of translator that should be used for each effect.

Loop will be translated once and ​converted into machine code - (a)  

Loop will be translated four times asthe program is run - (b)  

Choose from the below words
compiler
interpreter
assembler
translator
encoder
loader
compressor
115.

Tarvit High School is trialling a voting system to decide their representative for the pupil council. A programmer creates a voting app to allow pupils to cast their vote.

The winner is displayed once voting is closed.

After voting is closed three candidates have received the same number of

votes. Their names are stored in a data structure called winners.

The app uses a predefined function to pick one candidate from winners.

Choose which of these excerpts of code will display the name of the winning candidate.

a)

index = RANDOM(0,2)

SEND winners[index] TO

DISPLAY

b)

index = RANDOM(1,3)

SEND winners[index] TO

DISPLAY

c)

SEND winners[ROUND(index,2)] TO

DISPLAY

d)

SEND winners[RANDOM(3)] TO

DISPLAY

116.

A question in a program requires a true or false response.

State the most suitable data type for storing this response (one word only)

(a)  

117.

The code below should receive input and display a user’s name.

Identify the syntax error and logic error in the program code shown.

Syntax error: ​ ​ (a)  

Logic error: ​ (b)  

Choose from the below words
name output before input
SD instead of SEND
name not defined on Line 1
missing "" around name
& symbol not correct
118.

Convert the following 8‑bit binary number into denary.

1110 0010

(a)  

119.

A user enters the value 2 when running the program shown.

State the output.

(a)  

120.

Why is the development of software called an iterative process?

a)

Previous stages in development are

often revisited

b)

Each stage is repeated several times

c)

Each stage happens after the previous stage is finished

d)

When the last stage is finished the first stage begins again

121.

Which answer is NOT a reason why encryption is used when sending emails across wireless networks?

a)

to try to prevent unauthorised

reading of email

b)

to scramble data to

prevent access from individuals

who do not have permission

c)

to scramble information to make it

unreadable until decrypted

d)

to reduce the size of email to make it transmit faster

122.

Input validation is required to ensure that a program will only accept the numbers 1 or 5.

Choose the examples of exceptional test data that could be used to test

the design.

a)

1

b)

5

c)

3

d)

0

123.

Which one is NOT a way in which schools can help to reduce the environmental impact of the

computers they use

a)

adjust settings on monitors

b)

change power down settings

c)

leave computers on standby

d)

remove unwanted data and applications

124.

A vector graphics package is used to create a floor plan for a house as shown.

State the name of the object used to create the outline of the sink

(a)  

125.

A vector graphics package is used to create a floor plan for a house as shown.

The line thickness and line colour are attributes of the lines used to draw the outside walls.

Which one of of these could NOT be another attribute of these lines.

a)

fill colour

b)

(x, y) coordinates

c)

transparency

d)

opacity

126.

A cinema is developing an app to survey customers. Cinema staff will ask customers

questions as they leave the cinema. Staff will use a touchscreen on a tablet to input

and submit the responses given by each customer.

Customers will be asked the following questions:

• Which of the two films the cinema is currently showing did you see?

• What score would you give the film, from 1 to 5?

• Did you purchase food in the cinema?

At the end of each day the app will calculate the average score for each film.

The suggested design for this part of the app is shown.

identify a value that will be stored as an integer.

a)

tota customers

b)

score for film

c)

film A total

d)

average score for film

127.

A cinema is developing an app to survey customers. Cinema staff will ask customers

questions as they leave the cinema. Staff will use a touchscreen on a tablet to input

and submit the responses given by each customer.

Customers will be asked the following questions:

• Which of the two films the cinema is currently showing did you see?

• What score would you give the film, from 1 to 5?

• Did you purchase food in the cinema?

At the end of each day the app will calculate the average score for each film.

The suggested design for this part of the app is shown.

Identify the condition used in the loop.

128.

Mark writes a program to calculate a worker’s average weekly wage. The first part of the program asks the user to log in. They are given three attempts to enter the correct password which is ‘Bingo’.

Complete line 10 of the code above.

UNTIL ​ (a)   ​ ​ (b)   ​ (c)  

Choose from the below words
password = "Bingo"
AND
attempts=3
OR
attempts < 3
"Bingo"
3
NOT
attempts > 3
129.

Mark writes a program to calculate a worker’s average weekly wage. The first part of the program asks the user to log in. They are given three attempts to enter the correct password which is ‘Bingo’.

State the data type of the variable 'password'. ​ ​ ​

(a)  

130.

Mark writes a program to calculate a worker’s average weekly wage. The shown section of code calculates the average weekly wage.

When evaluating this code, it is found to be inefficient.

Which extract of code rewrites lines 11 to 18 using more efficient constructs?

a)

1

b)

2

131.

A cinema is developing an app to survey customers. Cinema staff will ask customers

questions as they leave the cinema. Staff will use a touchscreen on a tablet to input

and submit the responses given by each customer.

Customers will be asked the following questions:

• Which of the two films the cinema is currently showing did you see?

• What score would you give the film, from 1 to 5?

• Did you purchase food in the cinema?

At the end of each day the app will calculate the average score for each film.

The suggested design for this part of the app is shown.

Identify an inefficient part of the design that could be removed without affecting the solution.