module documentation

Provides code for end-of-chapter exercises.

Function example1 Return the sum of the elements in sequence S.
Function example2 Return the sum of the elements with even index in sequence S.
Function example3 Return the sum of the prefix sums of sequence S.
Function example4 Return the sum of the prefix sums of sequence S.
Function example5 Return the number of elements in B equal to the sum of prefix sums in A.
def example1(S):

Return the sum of the elements in sequence S.

def example2(S):

Return the sum of the elements with even index in sequence S.

def example3(S):

Return the sum of the prefix sums of sequence S.

def example4(S):

Return the sum of the prefix sums of sequence S.

def example5(A, B):

Return the number of elements in B equal to the sum of prefix sums in A.