wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CSP 1.1.5-1.1.6 Variable Roles

Total questions: 35

Worksheet time: 18mins

Name
Class
Date
1.

Which variable role involves assigning a value once.

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

2.

Which variable role involves having unpredictable values?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

3.

Which variable role involves keeping a running total?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

4.

Which variable role involves keeping a running list?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

5.

Which variable role might be best to use for keeping score?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

6.

Which variable role might be best to use for creating a shopping list?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

7.

Which variable role might be best to use for updating us on the color of a person's shirt throughout the year?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

8.

Which variable role might be best to use for listing the color of a person's shirt throughout the year?

a)

Fixed

b)

Most recent

c)

Accumulator

d)

Aggregator

e)

One-way flag

9.

Which variable role does varF have?

a)

Accumulator

b)

Aggregator

c)

Most Recent

d)

Fixed

10.

What happens when the sprite is clicked?

a)

The value of mouse x is placed in a list.

b)

The value of mouse x is added to the value of varF

c)

varF is initialized to the value 0.

d)

The value of mouse x is multiplied by the value of varF.

11.

What happens when the green flag is clicked?

a)

The value of mouse x is placed in a list.

b)

The value of mouse x is added to the value of varF

c)

varF is initialized to the value 0.

d)

varF is assigned the value of mouse x.

12.

Which variable role does VarE have?

a)

Aggregator

b)

Most Recent

c)

Accumulator

d)

Fixed

13.

What happens when the green flag is clicked?

a)

Items in the list named VarE are removed.

b)

VarE is initialized to 0.

c)

VarE has its value set to x position

d)

Items in the list named VarE has the value of x position inserted.

14.

Which variable role involves a predetermined sequence of values?

a)

Stepper

b)

Best-So-Far

c)

Walker

d)

One-Way-Flag

15.

Which variable role will take on the values of elements of an iterator

a)

Stepper

b)

Best-So-Far

c)

Walker

d)

One-Way-Flag

16.

Which variable role involves holding the record?

a)

Stepper

b)

Best-So-Far

c)

Walker

d)

One-Way-Flag

17.

Which variable role involves determining whether a condition is met?

a)

Stepper

b)

Best-So-Far

c)

Walker

d)

One-Way-Flag

18.

A variable that has the role of one-way-flag will

a)

have a value of true or false

b)

have an integer value

c)

have a list of elements

d)

have sequential values

19.

A variable that has the variable role of walker will...

a)

have the value of each element in a list.

b)

have the value of true or flase

c)

be a list of elements

d)

have integer values

20.

A variable that has the variable role of stepper is...

a)

usually used to count

b)

a list of elements

c)

true or false

d)

usually to keep track of the best score (record)

21.
Maintains a running total.
a)
Aggregator Variable
b)
Best-so-far Variable
c)
Accumulator Variable
d)
Algorithm
22.
Stores a list of values built up over time and remembers separate individual values.
a)
Accumulator Variable
b)
Aggregator Variable
c)
Global Variable
d)
Boolean Expression
23.
A step-by-step procedure, like a recipe, but often involving decisions.
a)
Code
b)
Algorithm
c)
Event Handler
d)
Encapsulation
24.
Keeps track of a record best or worst and updates when a new record best or worst has been reached.
a)
Debugging
b)
Fixed Variable
c)
Best-so-far Variable
d)
Memory
25.
Evaluates to either true or false; used in the conditional of an if-structure.
a)
Fixed Variable
b)
Boolean Expression
c)
If-structure
d)
Event Handler
26.
The Boolean expression in an if-structure that is evaluated to determine which branch of code to execute.
a)
Boolean Expression
b)
Conditional
c)
If-structure
d)
Fixed Variable
27.
Stores a value that will not change over the course of the entire program.
a)
Controlled Variable
b)
Walker Variable
c)
Fixed Variable
d)
Stepper Variable
28.
Evaluates a Boolean expression and executes some code if the expression is true (and possibly other code if it is false).
a)
Most Recent Variable
b)
Boolean Expression
c)
if-Structure
d)
One-way Flag Variable
29.
Data that is used by a program
a)
Output
b)
Input
c)
Memory
d)
State
30.
Repeating a step-by-step procedure several times; also used to refer to single execution of that repetitive procedure.
a)
Iteration
b)
Algorithm
c)
Best-so-far Variable
d)
Encapsulation
31.
Stores user input or stores information about a program’s state that changes unpredictably.
a)
Stepper Variable
b)
Waterfall Variable
c)
Most Recent Variable
d)
Fixed Variable
32.
Stores whether a condition has been true yet; reset before iteration and possibly raised during iteration.
a)
Fixed Variable
b)
Most Recent Variable
c)
One-way Flag Variable
d)
Waterfall Variable
33.
An outline of the basic ideas behind how algorithms will work.
a)
Code
b)
Pseudocode
c)
Script
d)
Lists
34.
A variable that counts in an arithmetic sequence, usually counting by ones starting at 0 or 1.
a)
Stepper Variable
b)
Variable Roles
c)
Walker Variable
d)
Waterfall Design
35.
Stores one item from a list at a time during iteration.
a)
One- Way Variable
b)
Walker Variable
c)
Fixed Variable
d)
Waterfall Variable