# this is a correct variable name
variable_name = 10

# this is not a correct variable name - variable names can't start with a number
4tops = 5

# here's the error generated from using a Python keyword - notice the color of the variable name: it's not the same 
# as the one in the cells below
finally = 7

# these variables are not the same
distance = 10
Distance = 20
disTance = 30

print "distance = ", distance
print "Distance = ", Distance
print "disTance = ", disTance

"""
Explanation: The Basics: Synatx, Indentation, Comments, etc ...
Variables

Python has similar syntax to C/C++/Java so it uses the same convention for naming variables: variable names can contain upper and lower case character & numbers, including the underscore ( _ ) character. 
Variable names are case sensitive
Variable names can't start with numbers or special characters (except for the undescore character)
Variables cannot have the same names as Python keywords 

| Keywords                      |
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|and|assert | as    |break |class|continue|def|del  |
|elif |else |except |exec|finally |for|from |global |
|if |import|in  |is|lambda  |not|or |pass|
|print  |raise|return   |try|while |with|yield |    |
End of explanation
"""


x = 11

if x == 10:
    print 'x = 10'
else:
    print 'x != 10'
    print 'Done'

print "Bye now"    


"""
Explanation: Indentation and Code Blocks
End of explanation
"""


# these are two separate statements
a = 4
b = 6

"""
Explanation: Statements/Multiline statements
A new line signals the end of a statement
End of explanation
"""


# use line continuation symbol (use with care)
a = 10 \
    + \
    10 + 10
print a

"""
Explanation: For multi-line statements, use the \ character at the end of the line
End of explanation
"""


# use prenthesis (preferable way) to have a multiline statements
a = (10
    +            20 +    
    10 + 10)
print a

"""
Explanation: or put the multilines in ()
End of explanation
"""


# this is a line comment
a = 10 # this is also a line comment
'''
this line is indsie a multi-line comment
so is this
and this
'''
a = 100 # this is outside the multi-line comment

"""
This is another way to declare a multi-line comment
Inside it
inside it too
"""

a = 100 # this is outside the multi-line comment

"""
Explanation: Comments
Comments begin after the # character which can appear anywhere on the line. Multiline comments begin and end with 3 matching ' or " characters.
End of explanation
"""


# multiline statement with comments
a = (10 # this is line 1
    +            20 +    # this is line 2
    10 + 10)
print a

"""
Explanation: You can put a comment inside a muliline statement
End of explanation
"""


