wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PLTW Activity 1.1.4 Guess a Number

Total questions: 13

Worksheet time: 7mins

Name
Class
Date
1.

What type of variable is currentX?

a)

local scope

b)

global scope

c)

None of the above

d)

local and global scope

2.

What kind of variable is randomX?

a)

local scope

b)

global scope

c)

None of the above

d)

local and global scope

3.

Stored data that is only used within a small part of a program and cannot be used by other parts of the program is a

a)

local variable

b)

global variable

c)

None of the above

d)

local variable and global variable

4.

Stored data that may be used by any part of the program is a

a)

local variable

b)

global variable

c)

None of the above

d)

local variable and global variable

5.

Using a large number of __________ variables adds complexity to your program, because all parts of the program can change ________ variables. Using __________ variables when possible saves time in debugging.

a)

local, local, global

b)

global, global, local

6.

This is an example of

a)

Natural Language

b)

Pseudocode

c)

MIT App Inventor Blocks

d)

Python

7.

This is an example of

a)

Natural Language

b)

Pseudocode

c)

MIT App Inventor Blocks

d)

Python

8.

Will the countdown clock, TImer, need to have a global scope or a local scope? Why? Select the best answer.

a)

local scope because then debugging is easier

b)

global scope because the value of Timer needs to be saved for the next Clock1.Timer event

9.

isNumber? TextboxGuess.Text returns a

a)

boolean

b)

integer

c)

float

d)

string

10.

Set LabelMessage,Text = "" is an example of

a)

local variable

b)

boolean

c)

initialization. Clear the value of the variable at the beginning of the code block.

d)

integer

11.

The If ... else if ... else if ... else is an example of a .... Select the best answer.

a)

nested if statement

b)

chained conditional

c)

nested if statement and chained conditional

d)

boolean expression

12.

TextboxMyGuess.Text = global secretNumber returns a

a)

boolean

b)

integer

c)

float

d)

string

13.

Which variable is set to False?

a)

Trial1

b)

Trial2

c)

Trial3

d)

Trial4

e)

Trial5