NEW
Font size
WorksheetsComputer Science Pick and Mix
Total questions: 55
Worksheet time: 28mins
Which statement is used to extract data from a database?
Extract
Get
Open
Select
If you were wanting to filter data, which clause would you use?
Where
Order by
From
Select
Using which word allows you to specify that more than one condition must be met in a query?
Also
And
Or
Where
Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?
And
Maybe
If
Or
Which character returns all the data found in a table?
%
#
*
/
Which word is missing from the following SQL statement?
Select * table_name
With
Where
From
And
How do we select all rows for the "Designer" table?
SELECT * FROM Designer
SELECT [All] FROM Designer
SELECT Designer.*
SELECT FROM Designer
How would we script a SQL query to select "Description" from the Item table?
SELECT Item.Description
EXTRACT Description FROM Item
SELECT Item FROM Description
SELECT Description FROM Item
Which query would return only the fields DesignerID and Designer?
SELECT * FROM Designers
SELECT DesignerID, Name FROM Designers
SELECT DesignerID AND Designer FROM Designers
SELECT DesignerID, Designer FROM Designers
How would you display Chairs in the Items table that have a Price greater than £50.
SELECT * FROM Items WHERE Type = 'Chair' AND Price > 50
SELECT * FROM Items WHERE Type = 'Chair' OR Price < 100
SELECT * FROM Iterms WHERE Type = 'Chair' AND Price >= 50
SELECT * FROM Items WHERE Price > 50
SQL query to find all the cities whose humidity is 95.
SELECT city WHERE humidity = 95
SELECT city FROM weather WHERE humidity = 95
SELECT humidity = 89 FROM weather
SELECT city FROM weather
Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70
Instructions carried out one after another in order is a...
List
Sequence
Collection
Series
A named value that can be changed while the program runs is called a...
number
sequence
choice
variable
While the program is running, if the program makes a choice if it should run some code or not, it is called a...
variable
sequence
selection
mistake
When a program repeats, looping over the same sequence, it is called...
iteration
a variable
an instruction
Define: Iteration
The repetition of a block of statements within a computer program.
Code is repeated based on a certain condition and is checked at the beginning of each iteration.
A decision within a computer program when the program decides to move on based on the results of an event.
In computer programming, this is a set of instructions that follow on one from another.
A loop that repeats a set number of times, usually implemented using a FOR loop.
Define: Condition Controlled Loop (while)
The repetition of a block of statements within a computer program.
Code is repeated based on a certain condition and is checked at the beginning of each iteration.
A decision within a computer program when the program decides to move on based on the results of an event.
In computer programming, this is a set of instructions that follow on one from another.
A loop that repeats a set number of times, usually implemented using a FOR loop.
Define: Selection
The repetition of a block of statements within a computer program.
Code is repeated based on a certain condition and is checked at the beginning of each iteration.
A decision within a computer program when the program decides to move on based on the results of an event. Sometimes called branching.
In computer programming, this is a set of instructions that follow on one from another.
A loop that repeats a set number of times, usually implemented using a FOR loop.
Define: Sequence
The repetition of a block of statements within a computer program.
Code is repeated based on a certain condition and is checked at the beginning of each iteration.
A decision within a computer program when the program decides to move on based on the results of an event. Sometimes called branching.
In computer programming, this is a set of instructions that follow on one from another.
A loop that repeats a set number of times, usually implemented using a FOR loop.
Define: Counter Controlled Loop
The repetition of a block of statements within a computer program.
Code is repeated based on a certain condition and is checked at the beginning of each iteration.
A decision within a computer program when the program decides to move on based on the results of an event. Sometimes called branching.
In computer programming, this is a set of instructions that follow on one from another.
A loop that repeats a set number of times, usually implemented using a FOR loop.
What is a variable?
Any inputted data
A type of algorithm
A laballed part of the computer's memory
A way of repeating a block of code
What type of data would your name be?
Real
Boolean
Integer
String
What type of data would Pi be?
Real
Integer
Boolean
Character
What type of data would either True or False be?
String
Character
Real
Boolean
What type of data would your age in years be?
Real
Integer
String
Boolean
What term is used to describe a variable being given a value?
Equals
Assignment
Input
Algorithm
What is meant by the term iteration?
A list of instructions for completing a task
Repeating a block of code
Giving a value to a variable
Breaking a problem down into simple parts
In this algorithm, on what line is iteration first used?
3
4
5
6
In this algorithm, which of the following is a variable?
password
loop
output
while
What does 'Defensive Design' mean?
A method of planning a program using shapes.
A method of planning a program using plain English.
A method of designing a program so that it functions properly and doesn't crash.
A method of checking that an input matches the criteria.
What does 'Input Validation' mean?
A method of removing unwanted characters from an input.
A method of planning a program using plain English.
A method of designing a program so that it functions properly and doesn't crash.
A method of checking that an input matches the criteria.
What does 'Input Sanitisation' mean?
A method of removing unwanted characters from an input.
A method of planning a program using plain English.
A method of designing a program so that it functions properly and doesn't crash.
A method of checking that an input matches the criteria.
Which of the following Validation Checks is the most suitable for checking a text box has been filled in?
Range Check
Presence Check
Format Check
Check Digit
Which of the following Validation Checks is the most suitable for checking a postcode has been entered correctly?
Range Check
Presence Check
Format Check
Check Digit
Which of the following Validation Checks is the most suitable for checking a number has been entered correctly?
Range Check
Presence Check
Format Check
Check Digit
What is the purpose of a Length Check?
To check data is within a specified range.
To check data is in the correct format.
To check data against a table of acceptable values.
To check data is the correct length.
What does 'Verification' mean?
Checking an input is within a specified range, for example DOB between 01/09/2009 and 31/08/2010 for new year 7s.
Checking an input is in the correct format, for example an email must include @.
Checking an input is correct, for example asking a user to type their password in twice (double entry).
Checking an input is the correct length, for example, a password should be at least 8 characters long.
What is the most common method of Authentication?
Biometrics.
Passwords.
An e-mail address.
A username.
What is a syntax error?
When a program cannot link to the correct library, eg import math is missing.
When a program runs out of memory, eg print (X[3]) when there are only 3 items in a list/array.
When the rules and grammar of the programming language have not been followed, eg prnt().
When a program does something unexpected, eg X/0
A variable is a named value that can be changed in the program.
False
True
What is a String?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is a String?
64
"cat"
True
0.5
What is an Integer?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is an Integer?
64
"cat"
True
0.5
What is a Float?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is a Float?
64
"cat"
True
0.5
What is a Boolean?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is a Boolean?
64
"cat"
True
0.5
