22
QuizMultiple Choice

Unit Test — Unit test

Question 22 • Introduction to Information Technology - EL3701

What happens in the process represented by the pseudocode below?get(answer)if(answer is yes)then(multiply 4 and 9)if(answer is no)then(do nothing)

Answer
A
The computer multiplies 4 and 9 if the answer is yes.
B
The computer multiplies 4 and 9 if the answer is no.
C
The computer always multiplies 4 and 9.
D
The computer always does nothing.

Explanation

The pseudocode first gets an answer, then checks whether it is yes. If it is, the computer multiplies 4 by 9; if it is no, it does nothing. Therefore, choice A is correct: the computer multiplies 4 and 9 if the answer is yes.

AI-written and checked against the verified answer.

Previous
Next