input: Write a function to find the maximum value in an array.
  assert findMaxValue([1, 2, 3, 4, 5]) == 5
  assert findMaxValue([10, 20, 30, 40, 50]) == 50
  assert findMaxValue([-10, -20, -30, -40, -5]) == -5
output: def findMaxValue(arr):
      if not arr:
          return None
      max_val = arr[0]
      for num in arr:
          if num > max_val:
              max_val = num
      return max_val