Font size
WorksheetsN5 Computing SDD/DDD/CS
Total questions: 89
Worksheet time: 54mins
What is a "field" in a database?
A row in a table
A column in a table
The entire database
A relationship between tables
What does the term "record" refer to in a database?
A single piece of data (e.g., a name)
A collection of related fields
A table in the database
A query result
What is a "primary key" used for?
To sort data alphabetically
To uniquely identify each record in a table
To create relationships between tables
To filter data in a query
What is a "relationship" in a database?
A single piece of data
A connection between two or more tables
A type of query
A database report
A (a) relationship allows one record in a table to be related to many records in another table?
In a database, what is a "data type"?
A method of sorting data
The type of data that can be stored in a field (e.g., text, number, date)
A type of query
A way to create relationships
Which of the following best describes the purpose of a "foreign key"?
To uniquely identify records within a table.
To create a link between two tables.
To sort data in a table.
To filter data in a query.
Which SQL command is used to retrieve data from a database table?
INSERT
UPDATE
SELECT
DELETE
What does the * symbol represent in a SELECT statement?
The primary key
All columns in the table
A specific column
A wildcard character for filtering
What is the purpose of the WHERE clause in a SELECT statement?
To sort the results
To filter the results based on a condition
To group the results
To join tables
Put the following in the correct order for a valid SQL statement
SELECT
FROM
WHERE
ORDER BY
You are to create a program that asks the user to enter their date of birth, the program will then tell the user how many days they have been alive for.
What is the input/process/output for this scenario
Input:Date of Birth
Process: calculate number of days between DOB and today
Output: Number of days alive
Input:Date of Birth
Process: Number of days alive
Output: calculate number of days between DOB and today
Input:Date of Birth
Process: Subtraction
Output: Age
Input:Age
Process: Subtraction
Output: Days alive
Select the logical operator
FOR
While
AND
=
Select the logical operator below
IF
WHILE
OR
SELECT
Choose the logical operator
:
NULL
NOT
WHERE
Select all the pre-defined functions
Round
Length
Random
WHILE
What is the correct code to generate a random number between 1 and 10
This is correct input validation
TRUE
FALSE
Input validation requires what kind of loop
WHILE
FOR
IF
LOOP
This code will calculate the length of the string stored in the variable name_length
True
False
This transfers the memory location to be read from or written to
Arithmetic and Logic Unit (ALU)
Data Bus
Address Bus
Control Unit
This transfers data between the processor and memory
Arithmetic and Logic Unit (ALU)
Data Bus
Address Bus
Registers
Performs all calculations and logical operations
Arithmetic and Logic Unit (ALU)
Data Bus
Address Bus
Control Unit
Temporary memory locations within the processor
Arithmetic and Logic Unit (ALU)
Data Bus
Address Bus
Registers
Controls the sequencing of fetching, decoding and executing instructions
Arithmetic and Logic Unit (ALU)
Data Bus
Address Bus
Control Unit
All RAM memory locations have a unique address for correct data read/write.
True
False
Good for testing, errors are highlighted straight away. This is an advantage of
Translator
Compiler
All lines are translated to machine code, this machine code version is then saved and can be executed. Machine code can be run again, and again without further translation. This is a definition of a
Translator
Compiler
Translates one program line into machine code and executes immediately.
Translator
Compiler
0.100101 x 25
What is the mantissa?
100101
2
5
0100101
0.100101 x 25
What is the exponent?
100101
2
5
10
0.100101 x 25
Can also be written as?
0.100101 x 2101
0.100101 x 2111
0.100101 x 2011
0.100101 x 2100
0.100101 x 25
Can also be written as?
18.5
1.85
185
0.185
What is the binary representation of the decimal number 13?
00001101
00001011
00001110
00001001
What is the binary representation of the decimal number 24?
0001 1000
0001 0110
0101 1011
0100 1100
What is the binary representation of the decimal number 255?
1111 1111
1101 1011
1110 1101
1001 1001
What is the binary representation of the decimal number 63?
1111 1111
1101 1011
0011 1111
1001 1001
What is the primary function of the Control Unit in a CPU?
Perform arithmetic operations
Store data
Control the execution of instructions
Transfer data between memory and processor
How many bits are needed to store This World in Extended ASCII?
88
10
80
72
How many bytes are needed to store the phrase Hello World in Extended ASCII?
88
11
80
10
How many bytes are needed to store the phrase Computer Science in Extended ASCII?
16
15
8
112
Reorder the following, smallest first
bit
byte
kilobyte
megabyte
gigabyte
There are (a) bits in a byte
What does ASCII stand for?
American Standard Code for Information Interchange
American Standard Code for Internet Interchange
American Standard Code for International Interchange
American Standard Code for Internal Interchange
What is a bitmap graphic?
A graphic composed of bits of pixels in a grid
A graphic composed of mathematical equations
A graphic that uses vector paths
A graphic that uses 3D models
Which file format is used for bitmap graphics?
SVG
JPEG
EPS
What is a disadvantage of bitmap graphics?
They are resolution-independent
They can be easily scaled without loss of quality
They can become pixelated when enlarged
They use less memory compared to vector graphics
What is a vector graphic?
A graphic composed of pixels in a grid
A graphic composed of mathematical equations
A graphic that uses bitmap images
A graphic that uses 3D models
Which file format is used for vector graphics?
JPEG
PNG
SVG
GIF
What is an advantage of vector graphics over bitmap graphics?
They are resolution-independent
They can become pixelated when enlarged
They use more memory compared to bitmap graphics
They are composed of pixels
Unicode's advantage over ASCII is
It can store more characters
It takes less bits to store a character
It only has 1 alphabet
It was the first standard
You can save energy use of a computer by
Turning down the brightness of the monitor
Turning up the brightness of the monitor
Keeping your laptop always charging
Switching off when not in use
The part of the processor that performs all calculations and logical operations is the
(a)
Which file format is used for vector graphics?
(a)
How many characters can standard ASCII represent?
(a)
How many bits are needed for 1 character in extended ASCII?
(a)
Extended ASCII uses (a) original ASCII uses (b) per character
Bitmap file formats include
SVG
GIF
JPEG
PNG
An entity is database terminology for a ?
Table
Record
Field
Attribute
An entity relationship (ER) diagram shows how two or more tables are linked together
True
False
The attributes of an entity are the ...?
Fields
Records
Tables
Relationship
The Primary Key (PK) in an ER diagram is shown using ...?
Asterix
Underline
Brackets
Colour
The Foreign Key (FK) in an ER diagram is shown using ...?
Asterix
Underline
Brackets
Colour
A Primary Key (PK) must be ...?
Unique
Number
Text
Short
A Foreign Key (FK) must be a Primary Key (PK) in another table
True
False
For the following two ENTITIES, which is the appropriate relationship:
RULER / COUNTRY
One to One
One to Many
Many to Many
For the following two ENTITIES, which is the appropriate relationship:
ZOO / ANIMAL
One to One
One to Many
Many to Many
For the following two ENTITIES, which is the appropriate relationship:
RECIPE / INGREDIENT
One to One
One to Many
Many to Many
For the following two ENTITIES, which is the appropriate relationship:
DOCTOR / PATIENT
One to One
One to Many
Many to Many
For the following two ENTITIES, which is the appropriate relationship:
SIM CARD / PHONE NUMBER
One to One
One to Many
Many to Many
For the following two ENTITIES, which is the appropriate relationship:
ACTOR / MOVIE
One to One
One to Many
Many to Many
Select the correct code for a running total in a loop
Reorder the following pseudocode for a running total in a loop
set initial total to 0
start loop
get number from user
add number from user to running total
Reorder the following pseudocode for input validation
Ask user for initial input
Loop while input does not match criteria
Display error message
Ask user for input again
Select the correct code for input validation
Select the correct code to choose a random number between 1 and 10
Select the correct code to round to 2 decimal places
Is python an interpreter or compiler programming language?
Compiler
Interpreter
What output will the console show, if 15 and 30 are entered by the user?
Syntax error
The sum of the two numbers - 45
The concatenation of the two strings - 1530
Compiler error
What result will display in the shell if 15 and 20 is entered by the user?
"num1 + num2"
1520
35
What datatype will the answer be if the user enters 15 and 30?
Integer
String
Boolean
Float
A named memory location where you store values
What is the position of the name "Robert" in the following list (array):
0
1
2
3
Each item in a list (array) has an index. What is the first index in a Python list (array)?
0
1
a
A
