Pay And Download
Complete Test Bank With Answers
Sample Questions Posted Below
Test Bank for Prelude to Programming Chapter 5
MULTIPLE CHOICE
a.  (15 * 2 <= 30) AND (15 – 2 > 30) 
b.  (15 * 2 <= 30) OR (15 – 2 > 30) 
c.  (15 * 2 > 30) AND (15 – 2 < 30) 
d.  (15 * 2 < 30) OR (15 – 2 > 30) 
ANS: B
MyName = “Elizabeth” and YourName = “Mike”
a.  MyName > YourName 
b.  MyName == YourName 
c.  YourName <= MyName 
d.  YourName >= MyName 
ANS: D
Set Number = 4
Repeat
Write 2 * Number
Set Number = Number + 2
Until Number = 8
a.  8
12 16 
b.  4
8 12 
c.  8
12 
d.  12
16 
ANS: C
a.  a positive number 
b.  a real number 
c.  an integer 
d.  a variable named Count 
ANS: C
a.  23 
b.  25 
c.  48 
d.  24 
ANS: B
a.  While 
b.  For 
c.  Repeat…Until 
d.  Do…While 
e.  all of the above are types of loops 
ANS: E
Set Count = 10
While Count > 0
Write Count
Set Count = Count – 2
End While
a.  10
8 6 4 2 
b.  10
8 6 4 2 0 
c.  8
6 4 2 
d.  8
6 4 2 0 
ANS: A
For (Count = 5; Count <= Number; Count++)
Write Count, Count * 2
End For
a.  5 10
6 12 7 14 
b.  5 10
6 12 
c.  5 10
7 14 
d.  5 7
10 14 
ANS: A
Set Count = 2
While Count < 10
Set Count = Count + 2
Write Count
End While
a.  2
4 6 8 10 
b.  2
4 6 8 
c.  4
6 8 10 
d.  4
6 8 
ANS: C
Write “Loops are fun!”
For (Count = 8; Count > 4; Count–2)
Write “Hooray!”
End For
a.  Loops are fun!
Hooray! Hooray! Hooray!

b.  Loops are fun!
Hooray! Hooray! 
c.  Loops are fun!  d.  nothing will display 
ANS: B
While Apples < 0
Write “You can’t eat “ + Apples + “at one time!”
End While
Write “Goodbye, apple lover.”
a.  You can’t eat 6 apples at one time!
Goodbye, apple lover. 
b.  nothing will display 
c.  You can’t eat apples at one time! 
d.  Goodbye, apple lover. 
ANS: D
a.  108.8 
b.  108 
c.  109 
d.  this is an illegal operation 
ANS: B
Declare Number, ComputerNumber As Integer
Do
Write “Please enter a number: “
Input Number
ComputerNumber = Number + 1
Write Number
While Number <= ComputerNumber
Write “The End”
a.  12 
b.  0 
c.  1 
d.  Nothing would cause this loop to end; it is an infinite loop. 
ANS: D
Do
Write A^2
Set A = A – 1
While A <= B
a.  9
9 9

b.  25
16 9 
c.  25
15 
d.  25
16 9 4 
ANS: B
Do
Set Y = Count + X
Write Y
Set Count = Count + 1
WhileCount <= X
a.  4
5 6

b.  1
3 5 
c.  4
5 6 7 
d.  3
4 5 6 
ANS: A
Set Number = 12
For (I = 1; I <= 15; I++)
Write “Enter a number: “
Input Number
Write “That’s a good number.”
End For
Write “Bye bye.”
a.  Set Number = 12
Write “Bye bye.” 
b.  Write “Enter a number: “
Write “That’s a good number.” 
c.  Write “Enter a number: “
Write “That’s a good number.” Write “Bye bye.” 
d.  Input Number 
ANS: D
Set A = 2
For (B = 1; B <=N; B++)
Set A = A + 2 * B
End For
Write A
a.  22  b.  16  c.  32  d.  18 
ANS: C
Set Number = Floor(A + C / B)
a.  4.87  b.  4  c.  4.9  d.  1.125 
ANS: B
Set Number = Ceiling(A + B * C)
a.  14  b.  13  c.  13.2  d.  15 
ANS: A
Set Number = Floor(Ceiling(A) * B)
a.  6  b.  8.74  c.  8  d.  6.1 
ANS: A
TRUE/FALSE
(Number * Number) <= (2 * Number).
ANS: F
ANS: F
(MyName < YourName) OR (MyName >= YourName)
ANS: T
ANS: T
ANS: F
For (X = 1; X <= 10; X+2)
ANS: F
For (X = 1; X <= N; X+3)
ANS: T
ANS: T
ANS: F
ANS: F
For (X = N; X <= Y; X++)
ANS: F
ANS: T
Int(6.89) = 6.
ANS: T
(50 <= 100) AND (9 > 12).
ANS: F
ANS: T
ANS: T
ANS: F
ANS: T
ANS: T
ANS: F
SHORT ANSWER
ANS: less
ANS: validate
Int(Number1) + Int(Number2) = __________.
ANS: 21
Int(Number1 + Number2) = __________. .
ANS: 22
ANS: infinite
ANS: indent
ANS: counter controlled
ANS: counter
ANS: iterations
ANS: initialized
ANS: accumulator
ANS: sentinel value
Floor(Number1) + Ceiling(Number2)
evaluates to __________.
ANS: 26
Int(Ceiling(Number1) + Ceiling(Number2))
evaluates to __________..
ANS: 27
initial value is __________ _________ the limiting value.
ANS: greater than
There are no reviews yet.