input: Write a function to generate an array of a specified length with random numbers ranging from 1 to 100. The function should return the populated array. If the given length is 0, the function should return an empty array.
  assert populateArray(5) == [34, 78, 92, 12, 56]
  assert populateArray(3) == [45, 23, 89]
  assert populateArray(0) == []
output: import random
  
  def populateArray(length):
      if length == 0:
          return []
      return [random.randint(1, 100) for _ in range(length)]