Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Ch 5 Practice

Total questions: 10

Worksheet time: 9mins

Name
Class
Date
1.
Which is the correct Boolean expression to check if num1 is between 0 and 10?
a)
num1>0 and < 10
b)
num1 > 0 and num1 < 10
c)
0 < num1 < 10
d)
num1 < 0 and num1 > 10
2.
Which expression will generate a random # from 900 to 905?
a)
Int(Rnd()*900) + 5
b)
Int(Rnd()*6) + 900
c)
Int(Rnd()*905) + 5
d)
Int(Rnd()*900) + 6
3.
Suppose num1 = 5 and num2 = 9.  Which expression below is TRUE?
a)
num1 > 5 and num2 > 5
b)
num1 > num2
c)
num1 < 0 or num2 > 10
d)
num1 + num2 >= 14
4.
Suppose num1 = 10.  Which Boolean expression below is TRUE?
a)
 not (num1 == 10)
b)
num1 != 10
c)
not (num1 == 9)
d)
num1 < 10
5.
Which expression would generate random #'s from 85 to 100?
a)
Math.Floor(Rnd() * 100) + 15
b)
Math.Floor(Rnd() * 15) + 85
c)
Math.Floor(Rnd() * 85) + 100
d)
Math.Floor(Rnd() * 16) + 85
6.
Evaluate the expression math.floor(1764 / 10) % 10
a)
6
b)
76
c)
6.4
d)
7
7.
Given the code below, what message box(es) would show if  grade = 62 ?
(hint: the script doesn't work like it's supposed to)
a)
Nice Job
b)
Keep Trying!
c)
See me after class :(
d)
Nice Job, Keep Trying, See me after class :(
8.
Given the code below, what message box(es) would show if grade = 92
a)
A
b)
A, Wow!
c)
A, Super
d)
no message boxes will be shown
9.
Given the code below, what message box(es) would show if grade = 75
a)
A
b)
A, Wow!
c)
A, Super
d)
no message boxes will be shown
10.
Which value of 'number' below would cause message "D" to show?
a)
25
b)
75
c)
125
d)
175