Ad

Write a function that accepts an integer (n) and calculates the multiples of 4 or 6 up to but not including the input number.

Return the sum of those multiples.

For example:

n = 20  ==>  64
n = 35  ==>  198
n = 120 ==>  2340
def find_multiples(n):
    total = 0
    for i in range(0, n, 2):
        if i % 4 == 0 or i % 6 == 0:
            total += i
    return total