wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IG2quiz

Total questions: 103

Worksheet time: 1hrs 16mins

Name
Class
Date
1.

Select the correct declaration of variables when finding the highest value in a list of values

a)

Highest ← 0

b)

Highest ← 100

c)

Highest ← [9]

d)

Highest ← Lowest

2.

Which of these is are selection statements?

a)

CASE...OF...OTHERWISE...ENDCASE

b)

IF...THEN...ELSE...ENDIF

c)

IF...THEN...ELSE...IF...THEN...ENDIF...ENDIF

d)

FOR....TO...NEXT

3.

Which lines are the errors located on?

a)

Line 4, 5, 8

b)

Line 1, 3, 4,

c)

Line 4, 5, 7

d)

Line 4, 5, 8 and a missing input

4.

Describe with an example the purpose of the validation check?

4 lines
5.

Correct the error on line 6

(a)  

6.

Describe with an example the purpose of the verification check?

4 lines
7.

A value that cannot change whilst the program is running

a)

Array

b)

Variable

c)

Constant

d)

Table

8.

Correct the error on line 2

a)

Counter = 0

b)

Counter = Num

c)

Counter = Total

d)

Counter = 100

9.

Which lines are the errors located on?

a)

Line 2, 7, 3

b)

Line 2, 6, 7,

c)

Line 8, 3, 7

d)

Line 2, 6, 7, 8

10.

A value that can change whilst the program is running

a)

Array

b)

Variable

c)

Constant

d)

Table

11.

Select the correct declaration of variables when finding the lowest value in a list of values

a)

lowest ← 0

b)

lowest ← 100

c)

lowest ← [9]

d)

lowest ← Highest

12.

A series of element of the same data type is

a)

Array

b)

Variable

c)

Constant

d)

Table

13.
What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println("Number: " + numArray[2]);
a)
Number: 2
b)
Number: 7
c)
Number: 4
d)
Number: 12
14.
What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println("Number: " + numArray[0]);
a)
Number: 2
b)
Number: 7
c)
Number: 4
d)
Number: 12
15.
What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println("Number: " + numArray[numArray.length - 1]);
a)
Number: 2
b)
Number: 0
c)
Number: 12
d)
Number: 6
16.
What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println(numArray.length);
a)
4
b)
5
c)
6
d)
7
17.
What is the correct way to initialize an array with 10 positions?
a)
int numbers = new int[10];
b)
int[] numbers = new int[];
c)
int[10] numbers = new int[10];
d)
int[] numbers = new int[10];
18.
What value is stored in each of the 5 positions in this array? (What is the default value provided by Java).
int[] numbers = new int[5];
a)
null
b)
1
c)
0
d)
nothing
19.
What value is at index 1 in this array?  String[] names = {"Mack", "Dennis", "Dee", "Charlie"};
a)
Mack
b)
Dennis
c)
Dee
d)
Charlie
20.
What value is at index 3 in this array?  String[] names = {"Mack", "Dennis", "Dee", "Charlie"};
a)
Mack
b)
Dennis
c)
Dee
d)
Charlie
21.
What is the correct way to create an array with these three numbers: 12  8  15
a)
int[] = {12, 8, 15};
b)
int[] nums = {12  8  15};
c)
int[] nums = {12, 8, 15}
d)
int[] nums = {12, 8, 15};
22.
True or False:  An array can be store different types of data (like store both doubles and ints).
a)
True
b)
False
23.
The first element in an array is always element 1.
a)
False
b)
True
24.
Arrays always have the same...
a)
data types
b)
text types
c)
numbers
d)
types of data
25.
Arrays are collection of the same data type under a single identifier.
a)
True
b)
False
26.
Values in arrays cannot be changed.
a)
False
b)
True
27.
The first and last elements of an array declared as scores[10] is...
a)
scores[0], scores[9]
b)
scores[1], score [11]
c)
scores[4], scores[3]
d)
score[0], score[9]
28.
myArray[0] + myArray[1] adds the first two values in an array together.
a)
True
b)
False
29.
Array elements can be used the same as any other variable.
a)
True
b)
False
30.
When an array is declared it will always be empty.
a)
False
b)
True
31.
The structure of an array cannot be changed once it is created.
a)
False
b)
True
32.
Loops are useful for cycling through an array.
a)
True
b)
False
33.

The 21st century is

a)

the digital age

b)

all about electricity

c)

the age of physics

34.

A computer program combines math and ______.

a)

science

b)

programs

c)

if statements

35.

An If/Else statement is

a)

a command that tells the computer to repeat an action

b)

a normal computer function

c)

a decision between 2 things

36.

Computers are really good at

a)

turning themselves off

b)

repeating commands

c)

not working

d)

doing jobs for humans

37.

Most computer languages have only about ___ words or commands

a)

100

b)

50

c)

1,000

d)

20

38.

When you define your own command and give it a command

a)

instruction

b)

loop

c)

function

d)

code

39.

When you get to a computer program and repeat a command, you can give it an exact number of times to

a)

repeat

b)

end

40.

a list of steps to finish a task

a)

algorithm

b)

HTML

c)

function

d)

execute

41.

HTML is the code used to create

a)

games

b)

UI

c)

webpages

42.

a green flag or play button that must be clicked to run the program

a)

null

b)

output

c)

go

d)

loop

43.

a programming language for creating web applications

a)

java

b)

HTML

c)

keystroke

d)

modifier

44.

doing an action over and over again

a)

program

b)

loop

c)

iteration

d)

function

45.

how a program looks to a user

a)

HTML

b)

Java

c)

workaround

d)

UI

46.

more than 1 way of coding a function

a)

variable

b)

query

c)

workaround

d)

x position

47.

Binary code is a computer language that uses only 2 options: _____ to carry out tasks

a)

letters and numbers

b)

zeros and ones

c)

x and y

48.

What is coding?

a)

something used to develop computer programs

b)

a form of "language" used to communicate computer actions

c)

an essential part to everything we do online

d)

All of these

49.

Look at the picture. Which answer describes the code pictured?

a)

travels forward, then backwards, then turns purple

b)

travels forward, then left, then turns purple

c)

travels left, then backwards, then turns blue

d)

this robot does not move

50.

an instruction for the computer

a)

algorithm

b)

command

c)

workaround

d)

query

51.

a question sent through a computer to receive information

a)

workaround

b)

function

c)

query

d)

java

52.

Look at the picture. Which answer describes the code pictured?

a)

travel forward for 3 seconds then stop

b)

travel backwards then forwards then stop

c)

change to multicolor

d)

the robot does not travel at all

53.
If I say the word "Algorithm" I am talking about what?
a)
When we all go to a store called Rithim.
b)
Algae that can DANCE!!!
c)
A new dance move.
d)
A list of steps you follow to finish a task.
54.

Code

a)

a step-by-step procedure for solving a problem

b)

Part of a program that does not work correctly.

c)

to write instructions for a computer.

d)

The art of creating a program.

55.

Event

a)

Part of a program that does not work correctly.

b)

The art of creating a program.

c)

An action that causes something to happen.

d)

Putting commands in correct order so computers can read the commands.

56.

Program

a)

An algorithm that has been coded into something that can be run by a machine.

b)

Putting commands in correct order so computers can read the commands.

c)

a step-by-step procedure for solving a problem

d)

o write instructions for a computer.

57.

Algorithm

a)

Putting commands in correct order so computers can read the commands.

b)

Finding and fixing problems in your algorithm or program.

c)

An action that causes something to happen.

d)

a step-by-step procedure for solving a problem

58.

Bug

a)

Part of a program that does not work correctly.

b)

An algorithm that has been coded into something that can be run by a machine.

c)

The art of creating a program.

d)

An action that causes something to happen.

59.

Debugging

a)

Putting commands in correct order so computers can read the commands.

b)

a step-by-step procedure for solving a problem

c)

to write instructions for a computer.

d)

Finding and fixing problems in your algorithm or program.

60.

Sequencing

a)

Part of a program that does not work correctly.

b)

Putting commands in correct order so computers can read the commands.

c)

An action that causes something to happen.

d)

to write instructions for a computer.

61.

Programming

a)

a step-by-step procedure for solving a problem

b)

The art of creating a program.

c)

An action that causes something to happen.

d)

Finding and fixing problems in your algorithm or program.

62.

Look at the puzzle and the code below. What can you fix in the code to help the bird get to the pig?

a)

Remove a move forward block

b)

Add a move forward block

c)

Change the first turn block to left

d)

Change the second turn block to left

63.

Look at the puzzle. What can you fix in the code so the bird will make it to the pig?

a)

Change the first turn block to left

b)

Remove a move forward block

c)

Add a move forward block

d)

Change the second turn block to left

64.

A bug is

a)

A creepy crawly thing

b)

A vehicle

c)

Part of a program that does not work

d)

A song

65.

What does this code do?

a)

Moves forward 1 time

b)

Moves forward forever

c)

Moves forward 5 times

d)

Moves left

66.

The art of creating a program.

a)

Artistic

b)

Programming

c)

Looping

67.
In coding terms an action or event you want to repeat multiple times is called a
a)
loop
b)
do-over
c)
time-line
d)
sequence
68.

What is print() called in Python coding?

a)

function

b)

variable

c)

string

d)

output

69.

What is input() called in Python coding?

a)

keyboard

b)

function

c)

variable

d)

string

70.

Look at this code. What is name called in Python?

a)

function

b)

variable

c)

name

d)

answer

71.

Look at this code. How do we call in Python something enclosed in speech marks?

a)

function

b)

string

c)

name

d)

answer

72.

Which function is used to show something on screen as output? Use just the keyword, without brackets

(a)  

73.

Which function is used to communicate with the program while running, writing something using the keyboard? Put the keyword without brackets

(a)  

74.

There is a mistake on line 1 of this program. Write the instructions with the corrections.

Be careful with spaces when writing your answer or the quiz will not recognise your answer!

(a)  

75.

Which keyword is used for an infinite loop or ITERATION?

a)

else

b)

if answer == "right":

c)

while True:

d)

elif

76.

show on screen the sentence "I love cats too" in Python

(a)  

77.

Ask the user the question "What is your favourite colour?" and save their answer in a variable called colour. Make sure to be precise or the quiz will discard your answer

(a)  

78.

write the Python instruction (just one line of code) that will check the following condition:

if the variable answer is equal to "right"

(a)  

79.

write the Python instruction (just one line of code) that will check the following condition:

if the variable answer is equal to "left"

(a)  

80.

What is the correct order of the following?

a)

if

elif

else

b)

if

elif

else

elif

c)

if

else

elif

d)

else

if

81.

Which symbols can you use to check if something is equal to something else?

Be careful when typing the answer!

(a)  

82.

check this code. What is missing?

(a)  

83.

Read these lines of code.

1. x = 2

2. y = 10

3. x = x+y

What is the value of x at the end of the program?

(a)  

84.

Read these lines of code.

1. x = "Hello"

2. y = "Hola"

3. z = "Ciao"

4. y = x

5. z = y

What will be the output print(z)?

(a)  

85.

A label for a characteristic of a sprite, such as its location and appearance

a)

Programming

b)

Property

c)

Program

d)

Parameter

86.

A placeholder for a piece of information that can change.

a)

Variable

b)

Function

c)

Parameter

d)

Program

87.

In programming, an expression that evaluates to true or false

a)

Algorithm

b)

Property

c)

Iteration

d)

Boolean

88.

An extra piece of information passed to a function to customize it for a specific need

a)

Property

b)

Boolean

c)

Variable

d)

Parameter

89.

A list of steps used to finish a task

a)

Program

b)

Algorithm

c)

Code

d)

Command

90.

A visual programming language that lets users program by connecting digital blocks, rather than by typing code.

a)

Conditional

b)

Algorithm

c)

Blockly

d)

Command

91.

An error in a program that prevents the program from running as expected

a)

Bug

b)

Debug

c)

Iteration

d)

Event

92.

A piece of code that you can call over and over again.

a)

Variable

b)

Function

c)

Loop

d)

Event

93.

One or more commands or algorithms designed to be carried out by a computer.

a)

Property

b)

Program

c)

Function

d)

Code

94.

An instruction for the computer

a)

Call

b)

Command

c)

Code

d)

Algorithm

95.

Statements that only run under certain conditions or situations

a)

Condition

b)

Conditionals

c)

Event

d)

Parameter

96.

Finding and fixing errors in programs

a)

Iteration

b)

Bug

c)

Debugging

d)

Command

97.

An action that causes something to happen.

a)

Event

b)

Coding

c)

Programming

d)

Variable

98.

A repetitive action or command typically created with programming loops.

a)

Variable

b)

Property

c)

Iteration

d)

Event

99.

The action of doing something over and over again.

a)

Algorithm

b)

Function

c)

Iteration

d)

Loop

100.

An algorithm that has been coded into something that can be run by a machine.

a)

Code

b)

Program

c)

Property

d)

Sprite

101.

The process of writing computer programs.

a)

Coding

b)

Program

c)

Programming

d)

Function

102.

A character on the screen with properties that describe its location, movement, and look.

a)

Sprite

b)

Algorithm

c)

Variable

d)

Draw Loop

103.

To add code inside a function so that the program knows what it is supposed to do when the function is called.

a)

Loop

b)

Define

c)

Program

d)

Code