In [14]:
# values are used in expressions (e.g., 1 + 1)
'fish'
Out[14]:
In [15]:
# the result of an expression is typically another value
(1 + (1)) + 1
Out[15]:
In [16]:
# values are of various types (e.g., int, double, string, list, boolean, function)
False
Out[16]:
In [17]:
# values can be tested for equality (e.g., 3 == 3.0)
3 > 4
Out[17]:
In [18]:
# variables are names for values
d = 5
d
Out[18]:
In [19]:
d = 'fish'
d
Out[19]:
In [20]:
# variables are created by assignment and do not need to be declared
In [21]:
# variables do not have types
In [22]:
# a special value is "None" which usually indicates information that is not present
a = None
a is None
Out[22]:
In [23]:
3 == 2.9999999999999999999999999
Out[23]:
In [24]:
3 is 2.999999999999999999999999999999
Out[24]: