
CIS 155 CIS155 Week 3 Quiz Answers
- (TCO 4) What pseudocode keywords are used to represent a selection with two actions?
- (TCO 4) In Visual Basic, which of the following is not a relational operator?
- (TCO 4) Both conditions must be true in order for the _____ operator to evaluate to true.
- (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?
- (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) - (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” - (TCOs 3, 4) Given the following If structure, assume B = 10. What will be the output?
- (TCOs 3, 8) What will be displayed after the following process is completed?
- (TCO 8) What will be displayed after the following process is completed?
Start
Set w = 0
Set x = 1
Set y = 2
Set z = 3
If ((w <> 0 OR x = 1) AND (y = 2 AND z <> 3)) then
Set ans = “T”
Else
Set ans = “F”
End if
Display ans
Stop
(TCO 8) What will be displayed after the following process is completed?
Start
Set grade = “X”
If (grade <> “A” AND grade <> “B” AND grade <> “C”
AND grade <> “D” AND grade <> “F”) then
Set message = "invalid grade"
Else
Set message = "valid grade“
End if
Display message
Stop