Font size
WorksheetsN5 Computing Science: SDD + CS Exam Questions
Total questions: 131
Worksheet time: 2hrs 50mins
Convert the following 8-bit binary number into denary.
1011 0111
(a)
Why may it be necessary to return to the implementation stage of an
iterative development process after the testing stage?
To correct errors
To add new features
To change the programming language
To charge the client more money
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.
compares 83 to 70
condition is false so doesn’t enter loop
sends signal to alarm
condition is true so enters loop
new speed is detected from sensor
The Bank of Aberdeen uses a firewall and encryption to ensure data is kept
secure.
Which description best explains the purpose of a firewall.
Restricts access to a network for unauthorised users
Scrambles data to make ir unreadable
Allows customers to acces their banking online
Prevents viruses and malware from entering the network
The Bank of Aberdeen uses a firewall and encryption to ensure data is kept
secure.
How can encryption help keep data secure?
Data is encoded and therefore unreadable
Prevents unauthorised users from accessing data
Prevents malware from entering the network
Data is stored in a database using a special key
An ASCII character set contains control characters.
Choose one example of a control character.
Cancel
Space
Delete
#
An ASCII character set contains printable characters.
Choose one example of a printable character.
Space
Null
Escape
Backspace
A vector graphic file stores objects and their attributes.
State the type of vector object shown.
(a)
A vector graphic file stores objects and their attributes.
Choose two attributes of this object.
Co-ordinates of centre
Fill colour
Number of sides
Angle of corner
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.
Advantage
Can be uploaded quickly
Disadvantage
Sound quality is poorer than original
Neither
Uses psychoacoustic
modelling techniques
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.
set to go into sleep
mode after a period of inactivity
reduce monitor brightness
clean up the hard disk drive or internal storage
reduce size of RAM memory
The value 195 would be stored in a computer system using ‘floating-point
representation’ as shown:
0⋅195×103
Identify the mantissa and exponent in the above floating-point representation.
mantissa is (a)
exponent is (b)
103
Convert the decimal number 60 into 8-bit binary.
(a)
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?
print(teamName,' scored', totalPoints, 'points')
print(teamName, scored, totalPoints, points)
print('Scotland scored 27 points')
print('teamName',' scored', 'totalPoints', 'points')
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)
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)
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?
SET refund TO ticketCost*0.25
SET ticketCost TO ticketCost - refund
SET refund TO ticketCost*0.75
SET ticketCost TO refund - ticketCost
SET ticketCost TO refund*0.25
SET refund TO refund - ticketCost
SET refund TO ticketCost*25
SET ticketCost TO 100 - refund
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.
0⋅8916×103
Identify the mantissa and exponent in the above floating-point representation.
mantissa = (a)
exponent = (b)
103
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)
The code shown is being tested to ensure it produces the correct output.
State one logical operator used in the code.
(a)
A graphic designer creates a business card for a taxi company.
State the type of a graphical object used in this design.
(a)
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.
(x,y) coordinates
fill colour
width
line thickness
number of wheels
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.
calculate total cost of flights
calculate number of days for trip
calculate how much travel money needed for trip
book airport taxis
order in-flight food and drinks
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)
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.
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
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
Loop for each passenger
Ask if passenger wants a bag
If answer = yes
Add 1 onto total
End if
End loop
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
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.
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
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
Loop for each passenger
Ask if passenger wants a bag
If answer = yes
Add 1 onto total
End if
End loop
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
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)
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?
Code 1
Code 2
Code 3
Code 4
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 seat generated is more likely to be allocated already
The loop will repeat more times
The loop will repeat fewer times
a seat generated is less likely to be allocated already
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?
Using an encrypted connection
Using a locked USB drive
By private courier service
Using a compressed file format
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)
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.
logic errors were found at a later stage
new features are requested by the clients
the program is not fit for purpose
the program code was not properly documented
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)
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?
it shows which code is inside the conditional statement
it shows the start and end of the program
it shows which code is inside the loop
it spaces out the code
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?
use more meaningful identifier names
provide an internal comment
use parenthesis to seperate the conditions
use text that is all in lower case
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)
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)
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)
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)
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.
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.
Images are represented by pixels
Each pixel has a binary value representing its colour
Images are represented by objects with attributes
Images usually take up a small amount of storage space
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.
Reduce screen brightness
Close unused apps and tabs
Adjust screen power-off settings
Update the system software to latest version
Convert the following 8-bit binary number into denary.
1011 1001
(a)
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) ;
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)
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)
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.
Because it is not an apple or pear tree it would still be set to the default price of £23
Because it is not an apple, pear or cherry tree
Because it comes in the same sizes of large or medium
Because all trees have the same price
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)
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.
Running total
Input validation
Looping through a 1D array
Linear search
Three records from a database table are shown below.
Choose a suitable type of validation for the bookRef field.
Length check
Restricted choice
Range check
Type check
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)
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)
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.
the program will not run
program stops running at line with error
program reports an error message
program displays a different output
The line shown is stored as a vector graphic.
Which attribute is not a possible attribute of this object?
x- or y- coordinate
line width
line colour
length
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)
The value 765·2 would be stored in a computer system using
‘floating-point representation’ as shown below.
0⋅7652×103
Identify the mantissa and exponent in the above floating-point
representation.
mantissa = (a)
exponent = (b)
103
0.7652 ×103
State a precaution used to secure data in digital communications.
(one word only)
(a)
The code for part of a program is shown.
State the pre-defined function that could be used in Line 43.
(a)
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)
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.
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.
Wrong variable name used on line 16
AND used instead of OR on line 13
The values 5.00 and 1.50 are on the wrong lines
No need for NOT on line 13
The program code shown calculates the delivery cost of orders.
Identify one logical operator in the code.
(a)
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)
Choose two reasons for using a conditional loop when writing code?
When impossible to know how many times the loop will execute
When it can be predicted how many time the loop will execute
To repeat code until a Boolean condition becomes True or False
To repeat code for each item in a data structure
How is a real number stored in a computer’s memory?
Stored as a mantissa and an exponent
Stored in binary
Stored in hexadecimal
Stored in cache memory
The validity of a password is checked as part of a program.
State the data type used to store the variable “passValid”.
(a)
How are vector images stored in a computer?
As an object with a set of attributes
As a list of binary numbers representing the colour of the pixels
As an image with a magnitude and direction
As a rectangular array of pixels
Part of a program is shown.
What happens in Lines 3 to 6 when the value 2.0 is entered at Line 2?
"Failed to qualify" message is displayed
"Congratulations" message is displayed
No message is displayed
Both messages are displayed
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.
P Singh
H Smith
P Singh
R Kroon
H Smith
J Kerr
P Singh
H Smith
no output
Part of the design of a program is shown.
Identify the graphical design notation shown.
(a)
Convert the decimal value 227 into the equivalent 8-bit binary number.
(a)
Why is it important that program code is readable?
To make it easier to maintain and change the program
So the program runs faster
So the program runs more efficiently
So the program does not crash
What is the function of a processor’s registers?
To store values required to execute a program instruction
To store frequently used program instructions
To carry out calculations required by the program
To transfer data to and from the main memory
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°?
The message "temperature too low" will display and a new reading will be taken
The loop will end and execution will continue after Line 5
A new temperature reading will be taken
Nothing will happen
Translators are used to convert high level languages into machine code.
Identify each type of translator.
This translator program reports
errors at the end of translation.
compiler
This translator needs to be present
in memory each time the program is
executed.
interpreter
This translator creates one line of machine code for every instruction
assembler
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?
Convert the denary number 75 into binary.
(a)
The value 637·1 is stored in a computer system using floating-point representation as shown below.
6⋅371×102
Identify the mantissa and exponent in the above floating-point representation.
Mantissa: (a)
Exponent: (b)
102
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.
assigning a group to a member of staff
changing a child’s group once they meet a certain age
generating the group names
storing details of children's birthdays
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?
password is set to be entered as a real value while the password is a string
The password is too long
TRUE and FALSE have been mixed up
The password should be a real number
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?
TEMP >= 14.5
TEMP < 14.5
TEMP > 14.5
TEMP >= 14.6
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)
The software development cycle is an iterative process.
Which answer best describes what is meant by the term iterative?
to return to a previous stage to make changes based on
information gained at the stage being worked on
Each stage is repeated several times before moving on to the next stage
The entire development process is completed once, then repeated to make improvements
Each stage is completed before the next stage begins
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.
Interpreter
Compiler
Assembler
Other
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.
Use meaningful identifier names
Use of white space
Use of built-in library subroutines
Use of longer variable names
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?
Input validation
Running total
Traversing a 1D array
Count occurrences
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?
x co-ordinate
y co-ordinate
fill color
line color
radius
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)
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?
Downloaded
Decompressed
Encrypted
Decrypted
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.
adjust settings on monitors
reduce clock speed
uninstall unused applications
decrease amount of RAM
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
1
7
0
8
a
1.5
2
5
A program is being designed to control the gas burner on a barbecue.
State the design technique shown.
(a)
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)
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)
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)
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)
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)
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
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)
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)
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.
Add up the scores
Validate scores
Golfer name
Date of game
Score per hole
Total score
Number of holes
Total par score
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.
No next hole button
No submit button
Some text is too small
No colour display
Does not show total score
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.
if score > par+2:
score = par+2
if score > par:
score = par+2
if score == par+2:
score = par+2
if score < par+2:
score = par+2
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)
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.
stores data about each pixel
stores binary representing RGB colour value
stores data about each object
stores lists of attributes and values
stores number of pixels in image
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 × 102
Identify the mantissa and exponent in the above floating-point representation.
Mantissa: (a)
Exponent: (b)
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
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
2.1 Loop 12 times
2.2 Set aveData to month[index]/12
2.3 End loop
2.1 Loop 12 times
2.2 Set total to total + month [index]
2.3 End loop
2.4 Set aveData to total/12
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
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)
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)
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)
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.
find winning representative
total votes for each candidate
validate the input
display winning candidate
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)
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?
WHILE
NOT (vote = 'A') AND NOT (vote ='B') AND NOT (vote = 'C') AND NOT (vote='D') DO
RECEIVE vote
END WHILE
WHILE
NOT (vote = 'A' OR vote='B' OR vote='C' OR vote='D' DO)
RECEIVE vote
END WHILE
REPEAT
RECEIVE vote
UNTIL vote='A' OR vote='B' OR vote='C' OR vote='D'
END REPEAT
WHILE
NOT (vote = 'A' AND vote='B' AND vote='C' AND vote='D' DO)
RECEIVE vote
END WHILE
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)
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.
index = RANDOM(0,2)
SEND winners[index] TO
DISPLAY
index = RANDOM(1,3)
SEND winners[index] TO
DISPLAY
SEND winners[ROUND(index,2)] TO
DISPLAY
SEND winners[RANDOM(3)] TO
DISPLAY
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)
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)
Convert the following 8‑bit binary number into denary.
1110 0010
(a)
A user enters the value 2 when running the program shown.
State the output.
(a)
Why is the development of software called an iterative process?
Previous stages in development are
often revisited
Each stage is repeated several times
Each stage happens after the previous stage is finished
When the last stage is finished the first stage begins again
Which answer is NOT a reason why encryption is used when sending emails across wireless networks?
to try to prevent unauthorised
reading of email
to scramble data to
prevent access from individuals
who do not have permission
to scramble information to make it
unreadable until decrypted
to reduce the size of email to make it transmit faster
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.
1
5
3
0
Which one is NOT a way in which schools can help to reduce the environmental impact of the
computers they use
adjust settings on monitors
change power down settings
leave computers on standby
remove unwanted data and applications
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)
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.
fill colour
(x, y) coordinates
transparency
opacity
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.
tota customers
score for film
film A total
average score for film
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.
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)
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)
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?
1
2
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.
