input: Write a function to create a Python script that populates an array with random numbers from 1 to 100. The function should take the length of the array as an input parameter and return the populated array.
  assert populateArray(5) is not None
  assert len(populateArray(5)) == 5
  assert all(1 <= num <= 100 for num in populateArray(5))
  assert populateArray(0) == []
output: import random
  
  def populateArray(length):
      return [random.randint(1, 100) for _ in range(length)]