Team,

my code is below and I DON'T want to use modules because am trying to learn all the logic.

I am trying to slit Array into two sub arrays, then sum all its elements to check if their elements sums are equal. I am getting error, may be am not using right syntax of class and object. can anyone hint please.

```
class Class_SplitArray_FindSums:
def splitArray(self,array):
    middle_index = len(array)//2
    self.first_half = array[:middle_index]
    self.second_half = array[middle_index:]
    print(self.first_half, self.second_half)
    return self.first_half, self.second_half

def sumOfSplitArrays(self):
    for ele1 in self.first_half:
        sum_of_ele1 = ele1 + self.first_half[ele1 + 1]
    print(sum_of_ele1)

    for ele2 in self.second_half:
        sum_of_ele2 = ele2 + self.second_half[ele2 + 1]
    print(sum_of_ele2)

    if sum_of_ele1 == sum_of_ele2:
        return True
    else:
        return False

my_array=[1,2,3,4,5,6,7,8,9]
classObj_SplitArray_FindSums = Class_SplitArray_FindSums()
classObj_SplitArray_FindSums.splitArray(my_array)
classObj_SplitArray_FindSums.sumOfSplitArrays()

```

output:

```
    Traceback (most recent call last):
  File "/Users/team/code/Persi/python/SplitArrayFindifTheirSumEq.py", line 35, in <module>
    classObj_SplitArray_FindSums.sumOfSplitArrays()
  File "/Users/team/code/Persi/python/SplitArrayFindifTheirSumEq.py", line 19, in sumOfSplitArrays
    sum_of_ele1 = ele1 + self.first_half[ele1 + 1]
IndexError: list index out of range

```