Question Detail

COS 102 If staments Objective Question

Question

According to the document, what is the primary purpose of decision making in programming?
Options
A To display information to the user.
B To choose an action based on a Boolean result.
Correct Answer
C To repeat a block of code multiple times.
D To store different types of data.
Correct Answer

Option B is the correct answer.

Detailed Explanation

Page 5, 'Binary Choices', states: 'Decision making is the ability of a computer to choose an action based on a Boolean result.'

Hint

Think about what kind of value a condition (like 'is light Green?') returns.

Question Info