Question Detail

COS 102 If staments Objective Question

Question

Which of the following describes the type of result a condition in an if statement must evaluate to?
Options
A Integer
B String
C Boolean (True/False)
Correct Answer
D Float
Correct Answer

Option C is the correct answer.

Detailed Explanation

Page 5, 'Binary Choices', states that 'Decision making is the ability of a computer to choose an action based on a Boolean result.' Boolean results are fundamentally True or False.

Hint

The 'Binary Choices' section directly addresses this.

Question Info