Question Detail

COS 102 Concept & Properties of Algorithm lecture 3 Week4 Objective Question

Question

Consider the following pseudocode snippet:
IF num1 > num2 THEN
ADD num1 to total
ELSE
ADD num2 to total
ENDIF

This snippet is an example of what type of action?
Options
A Assign Values
B Repeat Actions
C Perform Arithmetic
D Compare Values
Correct Answer
Correct Answer

Option D is the correct answer.

Detailed Explanation

Page 13, under 'Compare Values', provides this exact snippet as an example of an IF...THEN...ELSE structure used for comparing values.

Hint

Check page 13 for examples of 'Compare Values' operations.

Question Info