KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Write short notes on Variable.

Python Funda

1 Like

Answer

A variable is a named memory location which contains a value. When a variable is created, it reserves some space in the memory to store the data. The value of a variable can change depending upon the requirements in a program. For example, n = 25 means that the integer value 25 is assigned to the variable 'n', and the data value 25 will be stored in the memory location identified by the name 'n'. Whenever we refer to 'n', we will get 25. However, the value of 'n' can be changed at any time, and when a variable is reassigned with a new value, the original value will get replaced by the new value.

Answered By

2 Likes


Related Questions