input: Write a function to generate an array populated with random numbers from 1 to 100 based on the given length of the array. If the provided length is zero, then return an empty array.
  assert populateArray(5)==[random.randint(1, 100) for _ in range(5)]
  assert populateArray(0)==[]
output: def populateArray(length):
      if length == 0:
          return []
      return [random.randint(1, 100) for _ in range(length)]