<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def corruptDenseVector(vector, noiseLevel):
 """ Corrupts a binary vector by inverting noiseLevel percent of its bits. @param vector (array) binary vector to be corrupted @param noiseLevel (float) amount of noise to be applied on the vector. """

  size = len(vector)
  for i in range(size):
    rnd = random.random()
    if rnd < noiseLevel:
      if vector[i] == 1:
        vector[i] = 0
      else:
        vector[i] = 1