<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def writeNumber(self, n):
 """ Write number to the data stream . @param n: The number data to be encoded to the AMF0 data stream. """

        self.writeType(TYPE_NUMBER)
        self.stream.write_double(float(n))