Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 4 Assessment

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.
What will the value of the variable bags be at the end of the flowchart shown here?
a)
1
b)
2
c)
3
d)
4
2.
A named reference to a value that can be used repeatedly throughout a program.
a)
Value
b)
Variable
c)
String
d)
Operator
3.
A data type that is either true or false
a)

Boolean Indicator

b)

Boolean Switch

c)

Boolean Value

d)

Boolean Variable

4.
== indicates a Boolean expression (true/false) that means
a)
less than
b)
less than or equal to
c)
it is a comparison asking if two values on either side of the operator are equal
d)
it is a comparison asking if two values are not equal
5.
Evaluate these logical operators: True && false evaluates to _____. True || false evaluates to _____.
a)
True, true
b)
True, false
c)
False, false
d)
False, true
6.
NOT, AND, and OR, which evaluate to a Boolean value are examples of
a)
Functions
b)
Logical Operators
c)
Variables
d)
Assignment Operators
7.
A named group of programming instructions. Also referred to as a “procedure”.
a)
Function
b)
Logical Operators
c)
Variables
d)
Assignment Operators
8.
A command that executes the code within a function.
a)
Function Call
b)
Logical Operators
c)
Variable
d)
Assignment Operators
9.
A combination of operators and values that evaluates to a single value
a)
Function Call
b)
Expression
c)
Variable
d)
Assignment Operators
10.
The ability for an organization to constantly and consistently exceed the customer’s expectations
a)
Customer service
b)
Ethics
c)
Aggressive customer
d)
High-roller customer
11.
Sometimes your app does not work as expected when you declare a variable
a)
At the beginning of your code
b)
In an on event
12.
This function chooses the screen to display based on the score. What is the correct way to call this function?
a)
checkWin
b)
checkWin()
c)
checkWin();
d)
Function checkWin()
13.
This function chooses the screen to display based on the score. What is one thing we might change about this code?
a)
The logical operator on the if line
b)
The logical operator on the else if line
c)
The logical operator on the else line
d)
Add another line with the minus button
14.
What will be output by the console.log command on line 7?
a)
fizz
b)
250
c)
100
d)
0
15.
What number will be output by the console.log command on line 5?
a)
10
b)
12
c)
14
d)
16
16.
What number will be output by the console.log command on line 5?
a)
10
b)
30
c)
55
d)
25
17.
An ordered sequence of characters that cannot be used mathematically without converting to another form.
a)
Integer
b)
Float
c)
String
d)
Boolean
18.
What will be the order of numbers printed to the console when this program is run?
a)
1 23 23
b)
1 2 3
c)
2 3 1
19.
"You win!" never displays. What change would fix this issue?
a)
Delete to var on line 1
b)
Delete the var on line 3
c)
Use var in a function instead
20.
There is repeated code. Choose the code segments that would likely be moved to a new updateScreen() function which would be called in each of the onEvent blocks.
a)
Lines 5 & 7-9 and Lines 13 & 15-17
b)
Lines 1 & 3-10 and Lines 4 & 12