Every variable before being called has to be assigned a value, otherwise it will error. print message
appears the error message is not defined, it does not contain any value.
In other programming languages \u200b\u200bc + +, java, vb variables are declared and then assigned the value. Python is not necessary to declare, but will assign a value to variable and from that moment, the variable is already part of the program.
What we need to take into account is that Python is case sensitive and sensitive.
Assign value to integer variables:
year = 2009
birth = 1986
price = 10.93
>>> value = 5 * (4 + 2j) >>> print value
(20 +10 j)
string of characters (can be enclosed in single or double quotes) message = "Welcome to InforNext"
birth = 1986
value
visible = True print
0 comments:
Post a Comment