CIS 115 Logic and Design Week 3 Quiz Answers (2018)
BUY HERE⬊
(TCO 4) Which pseudocode keyword is not included in a selection with a single action?
(TCO 4) Relational operators can only compare variables that have the same _____.
(TCO 4) Both conditions must be true in order for the _____ operator to evaluate to true.
(TCO 4) If a valid score is between 0 and 100, which Boolean expression is true if the value in the score variable is valid?
(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)
= 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”
= 3, B = 10, and Z = “five”.
A * 2 < B / 2 OR Z < “two”
(TCOs 3 and 4) Given the following If structure, assume B = 7. Which will be the output?
(TCOs 3 and 8) Which will be displayed after the following process is completed?
Start
Set x = 3
Set y = 1
Set z = 1
If ((x = 1) AND (y = 1) AND (z = 1)) then
Set ans = “True”
Else
Set ans = “False”
End if
Display ans
Stop
Set x = 3
Set y = 1
Set z = 1
If ((x = 1) AND (y = 1) AND (z = 1)) then
Set ans = “True”
Else
Set ans = “False”
End if
Display ans
Stop
(TCO 8) Which will be displayed after the following process is completed?
Start
Set w = 0
Set x = 2
Set y = 2
Set z = 3
If ((w <> 0 OR x = 1) AND (y = 2 OR z <> 3)) then
Set ans = “True”
Else
Set ans = “False”
End if
Display ans
Stop
Start
Set w = 0
Set x = 2
Set y = 2
Set z = 3
If ((w <> 0 OR x = 1) AND (y = 2 OR z <> 3)) then
Set ans = “True”
Else
Set ans = “False”
End if
Display ans
Stop
(TCO 8) Which 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
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
Comments
Post a Comment