input: Write a function to calculate the sum of squares of all numbers in a given array of integers. The function should take a list of integers as input and return the sum of the squares of each element in the list. If the input array is empty, the function should return 0.
  assert sum_squares([2, 3, 4])==29
  assert sum_squares([1, 2, 3, 4, 5])==55
  assert sum_squares([0])==0
  assert sum_squares([-1, -2, -3])==14
  assert sum_squares([])==0
output: def sum_squares(arr):
      return sum(x**2 for x in arr)