objects
. To access such an object it must have a name, and such a named object is called a Variable
. The information stored inside an object is called as a value. Of course the machine itself typically has no idea how to interpret the information it contains, but the program certainly needs to know. For this reason a variable has a specific type. And it’s this type that constrains the use of that variable, such that only operations appropriate to the type may be performed. The following is the syntax declaration of the variable in python.
[c]variable=value;[/c]
The following is an example.
[c]a=10;[/c]
Where a
is the variable.
equivalent sign
is utilized to allot qualities to factors. The following is the image to understand data type declaration.
The operand to one side of the = administrator is the name of the variable and the operand to one side of the = administrator is the esteem put away in the variable. The following is an example .
[c]
splesson = 100 # An integer assignment
tutorial = 1000.0 # A floating point
name = "Sachin" # A string
print splesson[/c]
The result will be as follows.
[c]100[/c]