Question Detail

COS 102 lecture 4 Objective Question

Question

What is the function of the '=' symbol in Python, as described in the context of the "Assignment Operator"?
Options
A It compares two values for equality.
B It takes the value to the right and assigns it to the name on the left.
Correct Answer
C It performs arithmetic addition between two operands.
D It signifies the start of a new code block or statement.
Correct Answer

Option B is the correct answer.

Detailed Explanation

Page 29 explains, "The = operator takes the value to the right of the operator and assigns it to the name on the left."

Hint

The term 'assignment' itself suggests its primary function.

Question Info