input: Write a function to populate an array with random numbers from 1 to 100. The function should take the length of the array as an input and return the populated array.
  assert populateArray(5) != populateArray(5)
  assert len(populateArray(10)) == 10
  assert all(1 <= num <= 100 for num in populateArray(5))
output: import random
  
  def populateArray(length):
      return [random.randint(1, 100) for _ in range(length)]