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