wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Computer Science Pick and Mix

Total questions: 55

Worksheet time: 28mins

Name
Class
Date
1.

Which statement is used to extract data from a database?

a)

Extract

b)

Get

c)

Open

d)

Select

2.

If you were wanting to filter data, which clause would you use?

a)

Where

b)

Order by

c)

From

d)

Select

3.

Using which word allows you to specify that more than one condition must be met in a query?

a)

Also

b)

And

c)

Or

d)

Where

4.

Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?

a)

And

b)

Maybe

c)

If

d)

Or

5.

Which character returns all the data found in a table?

a)

%

b)

#

c)

*

d)

/

6.

Which word is missing from the following SQL statement?


Select * table_name

a)

With

b)

Where

c)

From

d)

And

7.

How do we select all rows for the "Designer" table?

a)

SELECT * FROM Designer

b)

SELECT [All] FROM Designer

c)

SELECT Designer.*

d)

SELECT FROM Designer

8.

How would we script a SQL query to select "Description" from the Item table?

a)

SELECT Item.Description

b)

EXTRACT Description FROM Item

c)

SELECT Item FROM Description

d)

SELECT Description FROM Item

9.

Which query would return only the fields DesignerID and Designer?

a)

SELECT * FROM Designers

b)

SELECT DesignerID, Name FROM Designers

c)

SELECT DesignerID AND Designer FROM Designers

d)

SELECT DesignerID, Designer FROM Designers

10.

How would you display Chairs in the Items table that have a Price greater than £50.

a)

SELECT * FROM Items WHERE Type = 'Chair' AND Price > 50

b)

SELECT * FROM Items WHERE Type = 'Chair' OR Price < 100

c)

SELECT * FROM Iterms WHERE Type = 'Chair' AND Price >= 50

d)

SELECT * FROM Items WHERE Price > 50

11.

SQL query to find all the cities whose humidity is 95.

a)

SELECT city WHERE humidity = 95

b)

SELECT city FROM weather WHERE humidity = 95

c)

SELECT humidity = 89 FROM weather

d)

SELECT city FROM weather

12.

Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.

a)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70

b)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70

c)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70

d)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70

13.

Instructions carried out one after another in order is a...

a)

List

b)

Sequence

c)

Collection

d)

Series

14.

A named value that can be changed while the program runs is called a...

a)

number

b)

sequence

c)

choice

d)

variable

15.

While the program is running, if the program makes a choice if it should run some code or not, it is called a...

a)

variable

b)

sequence

c)

selection

d)

mistake

16.

When a program repeats, looping over the same sequence, it is called...

a)

iteration

b)

a variable

c)

an instruction

17.

Define: Iteration

a)

The repetition of a block of statements within a computer program.

b)

Code is repeated based on a certain condition and is checked at the beginning of each iteration.

c)

A decision within a computer program when the program decides to move on based on the results of an event.

d)

In computer programming, this is a set of instructions that follow on one from another.

e)

A loop that repeats a set number of times, usually implemented using a FOR loop.

18.

Define: Condition Controlled Loop (while)

a)

The repetition of a block of statements within a computer program.

b)

Code is repeated based on a certain condition and is checked at the beginning of each iteration.

c)

A decision within a computer program when the program decides to move on based on the results of an event.

d)

In computer programming, this is a set of instructions that follow on one from another.

e)

A loop that repeats a set number of times, usually implemented using a FOR loop.

19.

Define: Selection

a)

The repetition of a block of statements within a computer program.

b)

Code is repeated based on a certain condition and is checked at the beginning of each iteration.

c)

A decision within a computer program when the program decides to move on based on the results of an event. Sometimes called branching.

d)

In computer programming, this is a set of instructions that follow on one from another.

e)

A loop that repeats a set number of times, usually implemented using a FOR loop.

20.

Define: Sequence

a)

The repetition of a block of statements within a computer program.

b)

Code is repeated based on a certain condition and is checked at the beginning of each iteration.

c)

A decision within a computer program when the program decides to move on based on the results of an event. Sometimes called branching.

d)

In computer programming, this is a set of instructions that follow on one from another.

e)

A loop that repeats a set number of times, usually implemented using a FOR loop.

21.

Define: Counter Controlled Loop

a)

The repetition of a block of statements within a computer program.

b)

Code is repeated based on a certain condition and is checked at the beginning of each iteration.

c)

A decision within a computer program when the program decides to move on based on the results of an event. Sometimes called branching.

d)

In computer programming, this is a set of instructions that follow on one from another.

e)

A loop that repeats a set number of times, usually implemented using a FOR loop.

22.

What is a variable?

a)

Any inputted data

b)

A type of algorithm

c)

A laballed part of the computer's memory

d)

A way of repeating a block of code

23.

What type of data would your name be?

a)

Real

b)

Boolean

c)

Integer

d)

String

24.

What type of data would Pi be?

a)

Real

b)

Integer

c)

Boolean

d)

Character

25.

What type of data would either True or False be?

a)

String

b)

Character

c)

Real

d)

Boolean

26.

What type of data would your age in years be?

a)

Real

b)

Integer

c)

String

d)

Boolean

27.

What term is used to describe a variable being given a value?

a)

Equals

b)

Assignment

c)

Input

d)

Algorithm

28.

What is meant by the term iteration?

a)

A list of instructions for completing a task

b)

Repeating a block of code

c)

Giving a value to a variable

d)

Breaking a problem down into simple parts

29.

In this algorithm, on what line is iteration first used?

a)

3

b)

4

c)

5

d)

6

30.

In this algorithm, which of the following is a variable?

a)

password

b)

loop

c)

output

d)

while

31.
Range validation ensures input data falls between specified values.
a)
True
b)
False
32.
Type validation ensures that input data is limited to only certain data types.
a)
True
b)
False
33.
Sanitisation is a type of validation.
a)
True
b)
False
34.
The two factors in two-factor authentication are typically Username and Password.
a)
True
b)
False
35.
Inputting invalid data can cause errors in a system.
a)
True
b)
False
36.
Defensive design is about anticipating potential problems at the planning stage.
a)
True
b)
False
37.

What does 'Defensive Design' mean?

a)

A method of planning a program using shapes.

b)

A method of planning a program using plain English.

c)

A method of designing a program so that it functions properly and doesn't crash.

d)

A method of checking that an input matches the criteria.

38.

What does 'Input Validation' mean?

a)

A method of removing unwanted characters from an input.

b)

A method of planning a program using plain English.

c)

A method of designing a program so that it functions properly and doesn't crash.

d)

A method of checking that an input matches the criteria.

39.

What does 'Input Sanitisation' mean?

a)

A method of removing unwanted characters from an input.

b)

A method of planning a program using plain English.

c)

A method of designing a program so that it functions properly and doesn't crash.

d)

A method of checking that an input matches the criteria.

40.

Which of the following Validation Checks is the most suitable for checking a text box has been filled in?

a)

Range Check

b)

Presence Check

c)

Format Check

d)

Check Digit

41.

Which of the following Validation Checks is the most suitable for checking a postcode has been entered correctly?

a)

Range Check

b)

Presence Check

c)

Format Check

d)

Check Digit

42.

Which of the following Validation Checks is the most suitable for checking a number has been entered correctly?

a)

Range Check

b)

Presence Check

c)

Format Check

d)

Check Digit

43.

What is the purpose of a Length Check?

a)

To check data is within a specified range.

b)

To check data is in the correct format.

c)

To check data against a table of acceptable values.

d)

To check data is the correct length.

44.

What does 'Verification' mean?

a)

Checking an input is within a specified range, for example DOB between 01/09/2009 and 31/08/2010 for new year 7s.

b)

Checking an input is in the correct format, for example an email must include @.

c)

Checking an input is correct, for example asking a user to type their password in twice (double entry).

d)

Checking an input is the correct length, for example, a password should be at least 8 characters long.

45.

What is the most common method of Authentication?

a)

Biometrics.

b)

Passwords.

c)

An e-mail address.

d)

A username.

46.

What is a syntax error?

a)

When a program cannot link to the correct library, eg import math is missing.

b)

When a program runs out of memory, eg print (X[3]) when there are only 3 items in a list/array.

c)

When the rules and grammar of the programming language have not been followed, eg prnt().

d)

When a program does something unexpected, eg X/0

47.

A variable is a named value that can be changed in the program.

a)

False

b)

True

48.

What is a String?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

49.

Which value is a String?

a)

64

b)

"cat"

c)

True

d)

0.5

50.

What is an Integer?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

51.

Which value is an Integer?

a)

64

b)

"cat"

c)

True

d)

0.5

52.

What is a Float?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

53.

Which value is a Float?

a)

64

b)

"cat"

c)

True

d)

0.5

54.

What is a Boolean?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

55.

Which value is a Boolean?

a)

64

b)

"cat"

c)

True

d)

0.5