
    Design a function that analyzes a customer's transaction history by calculating the sum of standard transaction amounts (represented by even numbers) that occur at regular payment intervals (even positions) in their transaction sequence, helping identify normal spending patterns for fraud detection. The function should only consider transactions at even-numbered positions (0-based indexing) and sum up only those amounts that are even numbers, as these represent typical recurring transactions.
    

    
def sum_even_and_even_index(arr):
    """
    Design a function that analyzes a customer's transaction history by calculating the sum of standard transaction amounts (represented by even numbers) that occur at regular payment intervals (even positions) in their transaction sequence, helping identify normal spending patterns for fraud detection. The function should only consider transactions at even-numbered positions (0-based indexing) and sum up only those amounts that are even numbers, as these represent typical recurring transactions.
    

    """
def sum_even_and_even_index(arr):
    """
    Design a function that analyzes a customer's transaction history by calculating the sum of standard transaction amounts (represented by even numbers) that occur at regular payment intervals (even positions) in their transaction sequence, helping identify normal spending patterns for fraud detection. The function should only consider transactions at even-numbered positions (0-based indexing) and sum up only those amounts that are even numbers, as these represent typical recurring transactions.
    

    """
    i = 0
    sum = 0
    for i in range(0, len(arr), 2):
        if arr[i] % 2 == 0:
            sum += arr[i]
    return sum