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