Question Detail

COS 102 lecture 4 Objective Question

Question

According to the document, what is the primary purpose of variables in Python?
Options
A To define the rules for how human users and the system should interpret a program.
B To execute instructions that perform an operation on one or more values.
C To act as containers for storing data values that can be accessed or changed.
Correct Answer
D To categorize different types of errors that can occur during program execution.
Correct Answer

Option C is the correct answer.

Detailed Explanation

Page 23 states, "Variables are containers for storing data values that can be access or change." It also mentions they point to memory locations.

Hint

Consider the basic function of a variable in any programming language.

Question Info