Question Detail

COS 102 lecture 4 Objective Question

Question

What is the primary function of the '=' symbol when assigning values to variables in Python?
Options
A It checks if two values are equal.
B It performs mathematical addition.
C It assigns the value on its right to the name on its left.
Correct Answer
D It declares a new data type.
Correct Answer

Option C is the correct answer.

Detailed Explanation

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

Hint

Focus on the definition of the 'assignment operator' on page 29.

Question Info