<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
Step1:  Python Basics (2016-09-09)
Content
Comments
Data Types
Simple Arithmetics
Strings
Comments
Comments provide important documentation for your code.
Step2:  Data Types
(see https
Step3:  What will be the data type of a+b?
Step4:  It's a float. But why? If it was an integer, information would get lost. Python chooses the simplest data type that preserves all information. However, this can be tricky if you don't pay attention...
Important
Step5:  Other common data types
Step6:  Simple Arithmetics
Step7:  Again, be aware of the data types
Step8:  For more complex mathematical operations, refer to the math or numpy modules, for instance.
Strings
(see https
<ASSISTANT_TASK:>
Python Code:
# this is a single line comment
this is a 
multi line
comment
Explanation: Python Basics (2016-09-09)
Content
Comments
Data Types
Simple Arithmetics
Strings
Comments
Comments provide important documentation for your code.
End of explanation
a = 5.1
print 'a', type(a)
b = 3
print 'b', type(b)
Explanation: Data Types
(see https://docs.python.org/2/tutorial/introduction.html#numbers)
Python supports the most common data types: integer, float, character, string, boolean. Based on the provided input, it selects the most simple data type.
End of explanation
print a+b, type(a+b)
Explanation: What will be the data type of a+b?
End of explanation
print '3/2', 3/2   # integer divided by integer
print '3./2', 3./2 # float divided by integer
Explanation: It's a float. But why? If it was an integer, information would get lost. Python chooses the simplest data type that preserves all information. However, this can be tricky if you don't pay attention...
Important: Always be aware what data type Python uses to prevent loss of information.
End of explanation
c = 'g'
print 'c', type(c)
d = 'stuff'
print 'd', type(d)
e = True
print 'e', type(e)
Explanation: Other common data types:
End of explanation
print a+b  # addition
print a-b  # subtraction
print a*b  # multiplication
print a/b  # division
print a//b # floor division
print a%b  # modulus
print a**2 # power
Explanation: Simple Arithmetics
End of explanation
#print a+d  # results in a TypeError
Explanation: Again, be aware of the data types:
End of explanation
print 'abc' + "def"                                  # concatenate strings (' and " can both be used, but not mixed)
print 'thereisabunnyhidinginhere'.find('bunny')      # index where the bunny hides
print 'thereisabunnyhidinginhere'.find('wolf')       # return -1 if failed
print '    lots of space   '.strip()                 # strip blanks
print '____lots of underscores____'.strip('_')       # strip underscores
print 'string_with_underscores'.replace('_', ' ')    # replace underscores
print 'list,of,things,like,in,a,csv,file'.split(',') # split in to list
print 'one\nword\nper\nline'                         # use '\n' to represent a line break
print '123abc'.isalpha()                             # check if string consists of letters only
print '123'.isdigit()                                # check if string consists of numbers only
Explanation: For more complex mathematical operations, refer to the math or numpy modules, for instance.
Strings
(see https://docs.python.org/2/tutorial/introduction.html#strings)
End of explanation
<END_TASK>