Simple Array Sum

  • + 2 comments

    here is my python code for the given problem

    def simpleArraySum(ar):
        sum=0
        for i in ar:
            sum=sum+i
            i=i+1
        return sum