View as PDF

Saskatchewan Computer Science 20 · Unit A

Data Types and Control Structures — 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 place in memory that stores a value is called

Understand It with Pulse
2

Which data type best stores a whole number count

Understand It with Pulse
3

A variable starts at 0. A loop adds 3 each time it runs, and it runs 5 times. The final value of the variable is ____

Understand It with Pulse
4

The graph shows a loop variable over iterations. The value at iteration 3 is ____

Diagram for Question 4
Understand It with Pulse
5

A whole number data type is called

Understand It with Pulse
6

A boolean variable can hold

Understand It with Pulse
7

A variable starts at 10. A loop adds 2 each time it runs, and it runs 4 times. The final value of the variable is ____

Understand It with Pulse
8

The graph shows a variable increasing by the same amount each iteration. The increase per iteration is

Diagram for Question 8
Understand It with Pulse
9

A sequence of characters used as text is called

Understand It with Pulse
10

An if statement runs its code

Understand It with Pulse
11

A variable starts at 5. A loop adds 5 each time it runs, and it runs 3 times. The final value of the variable is ____

Understand It with Pulse
12

A data type with only true and false values is called

Understand It with Pulse
13

A while loop stops when its condition becomes

Understand It with Pulse
14

A loop starts a counter at 0 and adds 2 each time while the counter is less than 10. The number of times the loop runs is ____

Understand It with Pulse
15

Code that repeats while a condition is true is called

Understand It with Pulse
16

Which is a valid use of a loop

Understand It with Pulse
17

A loop starts a counter at 1 and adds 3 each time while the counter is less than 13. The number of times the loop runs is ____

Understand It with Pulse
18

A test that is true or false and controls what code runs is called

Understand It with Pulse
19

A string is best described as

Understand It with Pulse
20

A variable that can hold whole numbers only is of type

Understand It with Pulse
21

Code that runs only when a condition is true is called

Understand It with Pulse
22

A loop starts a counter at 0 and adds 5 each time while the counter is less than 25. The number of times the loop runs is ____

Understand It with Pulse
23

A program needs to keep asking for a password until the user enters the correct one. Which loop is the natural choice?

Understand It with Pulse
24

A while loop runs 5 times and then stops. How many times was its condition checked?

Understand It with Pulse
25

A loop that runs a set number of times is called

Understand It with Pulse