Variable in Python
Link will be apear in 15 seconds.
Well done! you have successfully gained access to Decrypted Link.
•
Value
is a one of the fundamental thing, that a program manipulates.
•
Variable
is a name that refers to a value that maybe changed in the program.
•
The
assignment statement creates new variables and gives them values:
•
>>>
message = "What's up, Doc?"
•
>>>
n = 17
•
>>>
pi = 3.1415
Rules to be followed while naming a
variable:
•
Variable
names must be meaningful.
•
It
contains both numbers and letters, but they have to begin with a letter.
•
Case
sensitive.
•
The
underscore (_) character can appear in a
name.
•
Eg.
–
>>>76trombones
= "big parade“ >>> more$ =
1000000
–
SyntaxError:
invalid syntax SyntaxError: invalid
syntax
–
>>>
class = "Computer Science 101“
–
SyntaxError:
invalid syntax