Question 1.1. (TCO 4) Which pseudocode keyword is not included in a selection with a single action? (Points : 2)
If
Then
Else
End If
Question 2.2. (TCO 4) The expression amount < 10 is a(n) _____ expression. (Points : 2)
arithmetic
logical
Boolean
unary
Question 3.3. (TCO 4) For the || (or) operator to be false, _____. (Points : 2)
both conditions must be false
both conditions must be true
either condition can be false
either condition can be true
Question 4.4. (TCO 4) Which Boolean expression would be used to print a list of all books that have either less than 30 pages or more than 100 pages? (Points : 2)
pages < 30 && pages > 100
pages < 30 || pages > 100
pages > 30 && pages < 100
pages > 30 || pages < 100
Question 5.5. (TCO 4) Evaluate each of the following conditions (as being true or false). Assume A
= 3, B = 6, C = 3, and D = 18. (A=C) AND (C=D) (Points : 2)
True
False
Question 6.6. (TCO 4) Evaluate each of the following conditions (as being true or false). Assume A
= 3, B = 10, and Z = "five".
A * 2 > B / 2 OR Z > "two" (Points : 2)
True
False
Question 7.7. (TCOs 3 and 4) Given the following If structure, assume B = 100. Which will be the output?
(Points : 2)
You got an A
Missed It!
100
B
Question 8.8.
(TCOs 3 and 8) Which will be displayed after the following process is completed?
Start
Set x = 1
Set y = 1
Set z = 1
If ((x = 1) AND (y = 1) AND (z = 1)) then
Set ans = "T"
Else
Set ans = "F"
End if
Display ans
Stop
(Points : 2)
True
False
Question 9.9. (TCO 8) Which will be displayed after the following process is completed?
Start
Set w = 2
Set x = 1
Set y = 3
Set z = 4
If ((w <> 0 OR x <> 1) OR (y = 2 AND z <> 3)) then
Set ans = "True"
Else
Set ans = "False"
End if
Display ans
Stop (Points : 2)
True
False
Question 10.10. (TCO 8) Which will be displayed after the following process is completed?
Start
Set code = "Z"
Set dept = 40
If (code = "C" OR (dept >= 10 AND dept <= 30) )then
Set message = "valid department"
Else
Set message = "invalid department"
End if
Display message
Stop (Points : 2)
valid department
invalid department