Exercise: Python

Questions for: Variables

What is a variable?
A:
An object that holds True by default
B:
A value that is stored in a memory location
C:
A named location in memory that stores a value
D:
A method called implicitly while accessing the attributes of an object
Answer: C

In Python, a variable is a named representation of a memory location that is used to store a value, such as a number, string, or boolean. By assigning a value to a variable, you can easily refer to that value later in your code.

Ad Slot (Above Pagination)
Quiz