CBSE Class 12 Computer Science
Question 1 of 105
Python Revision Tour — Question 1
Back to all questions(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
In python, literal values have fixed memory locations and variable names reference them as values. This means that, although we can change the value of an integer variable, the process involves creating a new integer object with the updated value. Literal values, such as 10, have fixed memory locations, and variables act as references to these values. When we assign a new value to an integer variable, we are essentially creating a new object, and the variable now points to this new object. Hence, both Assertion and Reason are true and Reason is the correct explanation of Assertion.