Font size
WorksheetsNAt5 Exam Prep
Total questions: 70
Worksheet time: 35mins
What type of loop is this?
Fixed
Conditional
What standard algorithm is being used here?
Running total
Input validation
What type of loop is this?
Fixed
Conditional
What standard algorithm is being used here?
Running total
Input validation
What is wrong with the code for this loop?
Missing colon
No indentation
Incorrect values
Lines in the wrong order
What is wrong with the code for this loop?
Missing colon
No indentation
Incorrect values
Lines in the wrong order
What is wrong with the code for this loop?
Missing colon
No indentation
Incorrect values
Lines in the wrong order
What is wrong with the code for this loop?
Missing colon
No indentation
Incorrect values
Lines in the wrong order
Select all the ways that a program can be evaluated
Fitness for Purpose
Efficiency of Code
Robustness
Readability
Select all the possible data structures
1D Array
Variable
Lattice
Matrix
Which data type can only hold True or False
Boolean
Integer
Real
Single
Which data type would you say in the SQA exam is used to hold the number 4.97
Boolean
Integer
Real
Single
Select all Standard Algorithms for National 5
Traversing a 1D Array
Input Validation
Running Total Within a Loop
Conditional Statement
Which component carries data to and from Main Memory
Control Unit
Registers
Address Bus
Data Bus
Which component is temporary storage inside the processor?
Control Unit
Registers
ALU
RAM
Floating point representation stores real numbers in binary using...
mantissa and exponent
vector and exponent
mantissa and resolution
vector and resolution
Select all ways of reducing a computer's power consumption
Lower screen brightness
Automatic stand by mode
Stop hard disk spinning after a set time
Higher capacity hard disk
Select all ways of ensuring a program is readable
Create a wireframe
High text size
Internal commentary
Meaningful identifiers
What is a logic error?
The program won't run as the mistake in the code breaks the rules of the programming language
The program runs but in testing it produces the wrong result
The program runs but then crashes while running
The program created doesn't match the design
Select the correct SQL statement to add a new record for Mr Alford to the Teacher table
SELECT * FROM Teacher WHERE Title="Mr" AND Surname="Alford";
INSERT INTO Teacher (Title, Surname) VALUES ("Mr","Alford");
INSERT (Title, Surname) VALUES ("Mr","Alford") INTO Teacher;
INSERT (Title, Surname) VALUES ("Mr","Alford") FROM Teacher;
Vector Graphics store...
A colour code for every pixel
Objects and attributes as text
Animation and transparency
Thumbnails
Which validation would be added to a database field to ensure data is entered in that field?
Range Check
Presence Check
Length Check
Restricted Choice
What is a parameter in a predefined function?
Data that is sent into the function to allow it to do it's job
An error that stops the function from working
Details from the creator on what the function does
A subprogram called by an event
Real numbers are stored using a Mantissa and (a) ?
What is NOT gathered at the Analysis stage of the SDP?
End User Requirements
Structure Diagram
Functional Requirements
Inputs, Processes & Outputs
Convert the number 82 into 8 bit binary. Enter your answer with no spaces.
(a)
I am testing a section of code that is designed to validate exam marks out of 100. If I were to use the value 105 what type of test data is this?
Normal
Exceptional
Extreme
Whilst testing a program the program crashes unexpectedly. What type of error is this an example of?
Syntax
Logic
Execution
Code
Whilst evaluating a program I am considering whether or not the program copes with a variety of inputs. What aspect of my program am I evaluating?
Reliability
Readability
Robustness
Fitness for Purpose
I wish for my program to round a ski time to 2 decimal places. What would I use to save me programming time?
Standard Algorithm
Pre-Defined Function
Selection
Iteration
Which part of the CPU would work out the result of the calculation 5 * 6?
ALU
Control Unit
Calculation Unit
Main Memory
The development process can be described as iterative. What does this mean?
It means you might need to go back a step if you find an error.
It means you might need to skip over a step if you have removed an error.
It means you use loops to do multiple testing stages.
You use a loop to repeat code.
What design notation is shown in the image?
Structure Diagram
Flow Chart
Pseudocode
Flow Diagram
Which of the following data types are used in programming?
Text
Integer
Real/Float
Date
Boolean
Which of the following are logical operator?
> < ==
!= >= <=
AND OR NOT
IF WHILE
What is the purpose of a pre-defined function?
To carry out a function without having to write the code yourself.
To get the length of an object.
To give it a parameter and it will work out which function to use.
You create code that you can run multiple times without having to rewrite it.
Which programming constructs are used in this code?
Arithmetic Operations
Iteration
Assignment
Selection
String Concatenation
What is a standard algorithm?
A solution to a common programming problem.
Code that you can use by writing it's name then brackets EG. len("Hello")
A standard for writing code to ensure you have no syntax errors.
A set of instructions that a computer can follow to carry out a standard arithmetic operation.
What are the four points of evaluation for a program?
Fitness for Purpose, Efficient Coding Constructs, Robustness and Readability
Accuracy, Fitness for Purpose, Efficient Syntax and Decomposition
Pattern Recognition, Fitness for Purpose, Robustness and Readability
Readability, Efficient Syntax, Accuracy and Abstraction
Which of the following is the binary number for 101
01100101
00111101
10000010
01100111
What is the purpose of Extended ASCII?
To represent text using 7 bit binary numbers. Each character is assigned one unique 7-bit binary number to represent it.
To represent text using 8 bit binary numbers. Each character is assigned one unique 8-bit binary number to represent it.
To represent textual graphics so that each pixel is given a binary number to represent it's colour.
To represent vector graphics which are made up of objects. Each object is made up of attributes.
Which of the following is NOT a vector object?
Line
Circle
Rectangle
Polygon
Which of the following statements are False?
ALU carries out all calculation and logic operations in the CPU.
Registers are a small, temporary storage location in the CPU.
The Control Unit controls the computer and executes any instructions.
RAM is used to store the files and document for the user.
What is the purpose of a firewall?
To protect a computer system or network from unauthorised access.
To jumble up data so that it cannot be read/used.
To burn any incoming messages that do not have the correct security key.
To block data from leaving your computer system unless you have given it permission to do so.
Which of the following describes the relationship of the ER Diagram shown.
One staff member can be part of many jobs.
Many staff members can be part of one job.
One to Many
Many Jobs can be completed by many staff members.
Which of the following are types validation used in databases.
Input Validation
Range Check
Field Length Check
Length Validation
Restricted Choice
Which of the following SQL would produce the results table shown.
SELECT StaffID, DateOfBirth, Name FROM Staff ORDER BY Age ASC
SELECT StaffID, Age, Name FROM Staff ORDER BY Age ASC, Name ASC
SELECT Primary Key, Age, Name FROM Staff ORDER BY Name ASC
SELECT StaffID, Age, Name FROM Staff ORDER BY Name ASC, Age ASC
What is wrong with the following SQL.
SELECT StaffID, name, age, JobID
FROM Staff, Job
Missing an equi-join
You can't have two ID's in the SELECT clause.
Missing a condition
Missing a sort order
Emma wants to update the cost of only the white rice from 5.99 to 1.99 using the following SQL statement.
UPDATE Items
SET price = 1.99
WHERE itemName = "White Rice";
Evaluate the running of this SQL Statement.
It is fit for purpose and accurate.
It is not fit for purpose and accurate.
It is fit for purpose and not accurate.
It is not fit for purpose and not accurate.
Which of the following is not a SQL clause you need to know?
UPDATE
DELETE
VALUES
INSERT INTO
CREATE
How many field and records are shown in the image?
fields: 7 records: 4
fields: 7 records: 5
fields: 4 records: 7
fields: 5 records: 7
Which file type can be used to store images?
JPEG & PNG
JPEG & WAV
AVI & WAV
GIF & AVI
What are the advantages & disadvantages of using a WAV file format?
Advantages: Takes up less space than MP3
Disadvantages: Higher quality than MP3
Advantages: Higher quality than MP3
Disadvantages: Take up more space than MP3
Advantages: Larger frames per second than MP3
Disadvantages: Lower Quality than MP3
Advantages: Higher Quality
Disadvantages: Take up less space than AVI
Why might the users prefer audio being saved using a compressed file format like MP3 or WAV?
So it is a smaller file size for them to store it.
So that it is sent to their computer faster as the file size is smaller.
So that the sound quality is higher.
So that the transfer rate is slower.
Identify the parameters of the random integer function in the program shown.
0 and 5
0 and 99
randInt
randNum
Which standard algorithm is shown?
Input Validation
Running Total
Traversing an array
Password Protection
SET age TO 15
is an example of:
Assignment
Arithmetic Operations
Concatenation
Iteration
SET fullname TO firstname & " " & surname
is an example of:
Assignment
Arithmetic Operations
Concatenation
Iteration
FOR times = 0 TO 5 DO
is an example of:
Assignment
Iteration - a conditional loop
Concatenation
Iteration - a fixed loop
IF age>=18 THEN
is an example of:
Assignment
Iteration - a conditional loop
Concatenation
Selection - a conditional statement
Here is code to input 5 names into an array:
DECLARE name(4) AS ARRAY OF STRING
FOR ticker = 0 TO 4 DO
RECEIVE name(_________) FROM KEYBOARD
END FOR
What should be in the brackets in the third line of code above?
input
ticker
name
next
Which of these is not performed by the ALU?
Adding two numbers
Temporarily storing an address
Comparing two values
Multiplication
Which of these is a data structure?
Selection - conditional statement (IF)
A 1-dimensional array
Running total within a loop
Execution error
What are the two types of requirements considered at the Analysis stage of the Software Development Process?
End user and functional
User and functioning
End user and features
End users
What term is used to describe a process being repeated, with changes being made based on feedback?
Implementation
Repetition
Interlacing
Iteration
Which of the following input commands would allow the user to receive and store a character from the keyboard?
character = input("Please enter a character:")
character = int(input("Please enter a character:"))
character = float(input("Please enter a character:"))
character = bool(input("Please enter a character:"))
Which of the following input commands would allow the user to receive and store an integer from the keyboard?
integer = input("Please enter an integer:")
integer = int(input("Please enter an integer:"))
integer = float(input("Please enter an integer:"))
integer = bool(input("Please enter an integer:"))
Which of the following input commands would allow the user to receive and store a real number from the keyboard?
real_number = input("Please enter a real number:")
real_number = int(input("Please enter a real number:"))
real_number = float(input("Please enter a real number:"))
real_number = bool(input("Please enter a real number:"))
Which of the following input commands would allow the user to receive and store a string from the keyboard?
string = input("Please enter a string:")
string = int(input("Please enter a string:"))
string = float(input("Please enter a string:"))
string = bool(input("Please enter a string:"))
What is type casting?
It allows a piece of data to have it's data type changed, e.g. an integer could be changed to a string.
It allows the program to display the value of a variable on the screen.
It allows the program to collect data from the keyboard.
It allows the programmer to display the value of a variable while the program is running.
