wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

computer science unit 2

Total questions: 69

Worksheet time: 35mins

Name
Class
Date
1.

A ... is a name for a memory location used to store data that can be changed.

(a)  

2.

... is the process of converting one data type to another.

(a)  

3.

A ... is a location in memory, the value CANNOT be changed.

(a)  

4.

Select all the types of operators:

a)

/

b)

*

c)

+

d)

-

e)

%

5.

Entering data into a program.

(a)  

6.

Response from the program.

(a)  

7.

This is called...?

(a)  

8.

What symbol is used for commenting?

(a)  

9.

Why are comments used?

a)

to make comments about the code

b)

to send messages between programmers

c)

to explain key functions and key sections

d)

to explain the code for the users

10.

A part of the program which causes it to operate incorrectly. The error does not prevent the program running but it does not produce the expected output.

(a)  

11.

... is a set of instructions that follows on one after another.

(a)  

12.

In ... the next statement to be executed depends on whether the condition being tested is True or False.

(a)  

13.

... is the repetition of a process.

(a)  

14.

Which type of loop repeats a given number of times.

a)

for loop

b)

count controlled iteration

c)

while loop

d)

condition controlled

15.

Which type of loop repeats until a condition is met?

a)

for loop

b)

count controlled iteration

c)

while loop

d)

condition controlled

16.

An ... allows multiple items to be stored under one variable name, this reduces the need for multiples variables.

(a)  

17.

A translator for high level code that translates code all at once into machine code

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Programmer

18.

A translator for high level code that translate codes as the program is being run.

a)

Compiler

b)

Interpreter

c)

Assembler

d)

Programmer

19.

Enables the program to be run in an IDE to test the program

a)

Breakpoints

b)

Code Editor

c)

Error diagnostics

d)

Run time environment

20.

Helps the programmer follow syntax (programming rules) by colour coding, line numbering, auto-indentation etc...

a)

Error diagnostics

b)

Run time environment

c)

Translator

d)

Editor Tools

21.

A programming language like Python that is designed to be easy for humans to read and write and uses English command words and needs to be translated using a compiler or interpreter

a)

Translator

b)

High level language

c)

Low level language

d)

Machine code

22.

A programming language that is uses short/basic English, is harder for a human to understand

a)

Translator

b)

High level language

c)

Low level language

d)

Machine code

23.

Converts either a high level language or a low level language into machine code

a)

Translator

b)

High level language

c)

Low level language

d)

Machine code

24.

Binary code that can be directly run by a computer without being translated

a)

Python Code

b)

High Level Code

c)

Low Level Code

d)

Machine Code

25.

Helps the programmer by highlighting errors and giving some information/feedback

a)

Error diagnostics

b)

Run time environment

c)

Translator

d)

Editor Tools

26.

Code is translated one at a time (errors are given as the code is running)

a)

Compilier

b)

Interpreter

27.

Code is translated all at once (and a list of errors returns at the end)

a)

Compilier

b)

Interpreter

28.

print("Hello World!") is an example of...

a)

High-level language

b)

Low-level language

c)

Machine Code

29.

10001010 10011101 is an example of...

a)

High-level language

b)

Low-level language

c)

Machine Code

30.

'LDA 14, STA 5, INP 12' is an example of...

a)

High-level language

b)

Low-level language

c)

Machine Code

31.

We sometimes use Low-level language because (tick 2)...

a)

It uses less memory (RAM)

b)

It is easier to spot errors

c)

It is easier for humans to read as uses more English-type words

d)

The code can be passed easily to different CPUs

32.

We sometimes use High-level language because (tick 2)...

a)

It uses less memory (RAM)

b)

It is easier to spot errors

c)

It is easier for humans to read as uses more English-type words

d)

The code can be passed easily to different CPUs

33.

A translator for high level code that translates code all at once into machine code

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Programmer

34.

A translator for high level code that translate codes as the program is being run.

a)

Compiler

b)

Interpreter

c)

Assembler

d)

Programmer

35.

A translator used to convert a low level language into machine code

a)

Compiler

b)

Interpreter

c)

Assembler

d)

Programmer

36.

Pauses a program to give developers the chance to examine variables and their values

a)

Code Editor

b)

Run time environment

c)

Error Diagnostics

d)

Breakpoints

37.

Text area used to enter code in an IDE.

a)

Breakpoints

b)

Code Editor

c)

Error Diagnostics

d)

Run time environment

38.

These are tools provided by IDE's which give detailed feedback on errors in your code.

a)

Breakpoints

b)

Code Editor

c)

Error diagnostics

d)

Run time environment

39.

Enables the program to be run in an IDE to test the program

a)

Breakpoints

b)

Code Editor

c)

Error diagnostics

d)

Run time environment

40.

Suggests or correct code as you are writing it

a)

Error diagnostics

b)

Run time environment

c)

Syntax completion

d)

Keyword highlighting

41.

Colours command words in different colours to make code more readable

a)

Error diagnostics

b)

Run time environment

c)

Syntax completion

d)

Keyword highlighting

42.

A programming language like Python that is designed to be easy for humans to read and write and uses English command words and needs to be translated using a compiler or interpreter

a)

Translator

b)

High level language

c)

Low level language

d)

Machine code

43.

A programming language that is uses mnemonics, is harder for a human to understand and needs to be translated using an assembler.

a)

Translator

b)

High level language

c)

Low level language

d)

Machine code

44.

Converts either a high level language or a low level language into machine code

a)

Translator

b)

High level language

c)

Low level language

d)

Machine code

45.

Binary code that can be directly run by a computer without being translated

a)

Python Code

b)

High Level Code

c)

Low Level Code

d)

Machine Code

46.

An ... gate will be switched on if one input or the other is switched on.

(a)  

47.

An ... gate will be switched on if both the inputs are switched on.

(a)  

48.

A ... gate will be switched on if the input is off, if the input is on then the gate will be switched off.

(a)  

49.

Which gate is this?

(a)  

50.

Which gate is this?

(a)  

51.

Which gate is this?

(a)  

52.

This is the truth table for which gate?

(a)  

53.

This is the truth table for which gate?

(a)  

54.

This is the truth table for which gate?

(a)  

55.

An ... is a sequence of instructions that can be followed to solve a problem.

(a)  

56.

... is the process of breaking down complex problems into smaller chunks.

(a)  

57.

... is the process of creating a model by filtering the characteristics we need.

(a)  

58.

... there a some repetitive parts to the overall problem, thus means more than one part of the program can be dealt with by simply altering the information.

(a)  

59.

... search - each item in the list is checked in order from the start of the list until the item is found.

(a)  

60.

... search - an ordered list is split into two each time a comparison is made.

(a)  

61.

Select the advantages and disadvantages of linear search.

a)

list does not need to be ordered

b)

slower

c)

faster

d)

list must be in order

62.

Select the advantages and disadvantages of binary search.

a)

list does not need to be ordered

b)

slower

c)

faster

d)

list must be in order

63.

What are syntax errors? choose two

a)

When the program doesn't do what you want

b)

When programs do not meet the rules or grammar of the language

c)

When you make a spelling mistake

d)

Errors preventing the code running

64.

What are logic errors?

a)

An error that does not stop the code from executing

b)

When the logic gates are incorrectly connected

c)

An error where the logic doesn't make sense

d)

Code that does not give the desired output

65.

Syntax error, logic error or is this code OK?

a)

Syntax error

b)

Logic error

c)

It is great programming, well done Mr Taylor

66.

Syntax error, Logic error or this code is perfect?

a)

Another great program, it is all ok

b)

Syntax error

c)

Logic error

67.

Iterative testing is.....

a)

Testing code which iterated through input

b)

Testing is input

c)

Testing parts of the code during programming

d)

Testing when the program is complete

68.

Terminal testing is.....

a)

when you test code from a networked terminal

b)

when a terminal error causes the code to crash

c)

when to carry out final testing when the code is complete

d)

when you code is so bad to need to delete it and start again

69.

It is important to test code with a range of data. Which of the following is a recognised type of test data? choose four

a)

Valid

b)

Extreme/boundary

c)

Null/non-existent

d)

Critical

e)

Invalid