View as PDF

Saskatchewan Computer Science 20 · Unit B

Functions and Arrays — Practice Test

Saskatchewan Computer Science 20 • 25 questions

This practice test was made by AI and there may be mistakes. If a question or answer looks wrong, use the Flag a mistake button to let Brett know so he can fix it.

1

A named block of code that performs a task and can be reused is called

Understand It with Pulse
2

The first index of an array is

Understand It with Pulse
3

An array holds the values [10, 13, 16, 19, 22, 25]. The value at index 2 is ____

Understand It with Pulse
4

The graph shows array values by index. The value at index 2 is ____

Diagram for Question 4
Understand It with Pulse
5

A value passed into a function is called

Understand It with Pulse
6

A function is useful mainly because it

Understand It with Pulse
7

An array holds the values [10, 13, 16, 19, 22]. The value at index 0 is ____

Understand It with Pulse
8

The graph shows values increasing with index. The pattern is

Diagram for Question 8
Understand It with Pulse
9

A value sent back by a function to its caller is called

Understand It with Pulse
10

A parameter is

Understand It with Pulse
11

An array holds the values [10, 13, 16, 19, 22, 25, 28]. The value at index 4 is ____

Understand It with Pulse
12

An ordered collection of values stored under one name is called

Understand It with Pulse
13

If an array has 5 elements, its valid indexes are

Understand It with Pulse
14

A function that returns the larger of two numbers is called with 7 and 3. The value returned is

Understand It with Pulse
15

The position of a value in an array, starting at zero is called

Understand It with Pulse
16

Modularity helps a program by

Understand It with Pulse
17

A function with no return value is best described as a

Understand It with Pulse
18

One value stored in an array is called

Understand It with Pulse
19

A return value is

Understand It with Pulse
20

The values passed to a function when it is called are called

Understand It with Pulse
21

The part of a program where a variable can be used is called

Understand It with Pulse
22

A variable is declared inside a function. A second function tries to use that variable. What happens?

Understand It with Pulse
23

Breaking a program into smaller reusable parts is called

Understand It with Pulse
24

A program calls a function to calculate an area three times with different inputs. The main advantage of using the function is that the code is

Understand It with Pulse
25

A collection of ready made functions for use in programs is called

Understand It with Pulse