CIS 223 CH 3 Questions and Correct
Verified Answers
What is the result of the following statement, given that count = 6?
if (count == 6)
✓ True
True/False: The result of any test condition is always either true or false.
✓ True
Which statement is equivalent to the following?
(X > 6)
✓ !(x <= 6)
A valid test condition could be (x = 10), assuming x is an integer variable.
✓ False
A switch structure is a multiple alternative selection structure.
Top Mark !!!
, Top Mark Questions and Correct Verified Answers
✓ True
What integer values of y would make the following statement true?
(y >= 4) || (y < 8)
✓ all integers
Which of the following will set the variable num to the value 8?
✓ num = Math.sqrt(64);
Which of the following will generate a random number between 0 and 5?
✓ Math.floor(Math.random() * 6));
What will display after the following code is run if name = "Morris"?
if(name > "Joe")
document.write("Morris is a cat.");
else
document.write("Joe rules!");
Top Mark !!!