Question Detail

COS 102 If staments Objective Question

Question

According to the document, what is the primary role of decision making in programming?
Options
A To create visually appealing interfaces for users.
B To write code faster and more efficiently.
C To enable a computer to choose an action based on a Boolean result.
Correct Answer
D To perform complex mathematical calculations only.
Correct Answer

Option C 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.' This highlights the core function of decision making in programming.

Hint

Think about what 'if' statements help computers do when faced with choices.

Question Info